Replies: 0
Hello everyone,
I have a custom on_order_completed function that I run before the plugin’s on_order_completed and therefore all works fine, but I want to remove_action the original on_order_completed. How can I do that?
I tried from functions.php with:
remove_action( ‘woocommerce_order_status_completed’, array($mangopayWCMain , ‘on_order_completed’ ), 15, 1 );
which is literally what the add_action filter is (found mangopayWCHooks::set_hooks). It doesn’t work due to the undefined $mangopayWCMain variable, but I cannot figure how to.
I will be happy for any clues! Thank you!