I try to create my custom payment gateway for woocommerce , but i have small problem in the cancelation process when i call the cancel api for the gateway i use action hook to call my cancelation function
add_action( 'woocommerce_order_status_changed','woo_order_status_change_custom' , 10, 3);
public function woo_order_status_change_custom($order_id, $old_status, $new_status ){
// custom api code
}
and its working fine when i cancel the order from the wp-admin, but when the customer try to cancel his order from his account page the hook not trigger the function . Please any one could help with it ??