The following steps are for verification before calling the called user.
Check when you complete the order, whether you received an e-mail about the completion of the order, by e-mail specify the default woocommerce emails in the woocommerce settings of your administrator account.
The hook is registered correctly in the plugin file or in the theme.php function
Check the validity of your register woocommerce_order_status_completed after registration Following this path
add_action( 'woocommerce_order_status_completed', 'callback_function_name' ); global $wp_filter; // test is register action name with callback function print_r($wp_filter); exit;
check array, your function name is registered with this hook
[woocommerce_order_status_completed] => Array ( [10] => Array ( [wc_paying_customer] => Array ( [function] => wc_paying_customer [accepted_args] => 1 ) [wc_downloadable_product_permissions] => Array ( [function] => wc_downloadable_product_permissions [accepted_args] => 1 ) [callback_function_name] => Array ( [function] => callback_function_name [accepted_args] => 3 ) ) )
When you find a callback function in an array, it works when something doesn't happen in other plugins or theme functions.php file. To find the string as a whole of the plugin or theme function.php is called remove_action or remove_all_actions.
You can also check this method.
add_action( 'woocommerce_order_status_completed', 'callback_function_name', 1);
Changing the priority of a function from 10 to 1 means that your function will soon call any other callback functions with this hook registered.
Sorry for the bad english.
source share