hey I was trying to make a plugin that sends WhatsApp messages on order status change so this is my code
add_action("woocommerce_order_status_changed", "order_status_wapp",10,3);
function order_status_wapp($order_id, $old_status, $new_status){
if( $new_status == "processing" && carbon_get_theme_option( 'show_processing' )) { require("incl/apicall.php");
$message = carbon_get_theme_option( 'processing_message' );
require("incl/message_attr.php");
}
the code is working well when changing the status from the order table area ( actions ), but changing the status from the order details or programmatically shows no effect. is there any hook that triggers status change no matter what the way of changing is?