Woocommerce has lot of hooks and actions. Here is all the woocommerce order status actions list offered by the Woocommerce. All actions call custom defined function with a parameter order id. You can get order id and do further action according to your needs.
Actions
- add_action( ‘woocommerce_order_status_pending’, ‘my_custom_function’);
- add_action( ‘woocommerce_order_status_failed’, ‘my_custom_function’);
- add_action( ‘woocommerce_order_status_on-hold’, ‘my_custom_function’);
- add_action( ‘woocommerce_order_status_processing’, ‘my_custom_function’);
- add_action( ‘woocommerce_order_status_completed’, ‘my_custom_function’);
- add_action( ‘woocommerce_order_status_refunded’, ‘my_custom_function’);
- add_action( ‘woocommerce_order_status_cancelled’, ‘my_custom_function’);
Sample Function Code
function my_custom_function($order_id) { //do your actions }
Leave a Comment
You must be logged in to post a comment.