woocommerce_order_status_{action}
- by admin
- 0
“woocommerce_order_status_” used to define a callback for any order status changed. It works once we changed the order status
So here we need to specify the action.
Usually used once we declare a new order status.
Sample code is for “invoice” action
add_action(‘woocommerce_order_status_invoice, ‘custom_order_action’ );
function custom_order_action($order_statuses)
{
/* code execute after status changed */
}
“woocommerce_order_status_” used to define a callback for any order status changed. It works once we changed the order status So here we need to specify the action. Usually used once we declare a new order status. Sample code is for “invoice” action add_action(‘woocommerce_order_status_invoice, ‘custom_order_action’ ); function custom_order_action($order_statuses) { /* code execute after status changed…
“woocommerce_order_status_” used to define a callback for any order status changed. It works once we changed the order status So here we need to specify the action. Usually used once we declare a new order status. Sample code is for “invoice” action add_action(‘woocommerce_order_status_invoice, ‘custom_order_action’ ); function custom_order_action($order_statuses) { /* code execute after status changed…