I want to trigger an API request to Klavyos plugin whenever order status changes from pending payment to cancelled

Question

I’m using the Klavyo plugin to create flows and send emails to customers in case of abandoned carts and cancelled orders. Abandoned carts are a common issue so they are provided by default by the plugin.
But regarding cancelled orders, I want to send an API request to Klavyo whenever the order status changes from pending payment to cancelled.
How can woocommerce_order_status_changed hook know if the previous status was pending payment?

0
Ibrahim Najjar 4 months 2022-04-25T04:12:25-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse