I have a add-on which hit a link whenever order status is updated. But while using this there is different issue I am facing.
The issue is whenever I am making payment with paypal then stock amount is going down by 1, the main issue is whenever there is IPN hit then stock amount goes again down by 1. i.e finally stock amount goes down by 2.
Suppose if stock amount is 1 and I have purchased it using paypal then mail goes that order is out stock and it's quantity is 0. After some there is another message that order out of stock and quantity is -2.
But with other payment method it is working normally.
I am using 'change_order_status' hook. to hit my link.