I have this simple hook
add_action('woocommerce_order_status_changed', 'function_test', 10, 3);
function function_test($id, $status_transition_from, $status_transition_to ) {
error_log("¡Done!", 0);
}
The problem is that at this point, when I change the status in the order details but is not triggered.
I have been searching, but is not working anyway.
Here, woocommerce_order_status_completed not triggered, the user user5200704 comments that the method must appear in wp_filter.
This is right, my wp_filter at that point is:
[woocommerce_order_status_changed] => WP_Hook Object ( [callbacks] => Array ( [10] => Array ( [function_test] => Array ( [function] => function_test [accepted_args] => 3 ) ) )
Thanks