When the status is changed via bulk actions or by the status button, execute order.updated.
This commit is contained in:
parent
816a01a4ec
commit
e88c1bfb9e
|
@ -1351,6 +1351,7 @@ class WC_Admin_Post_Types {
|
|||
foreach ( $post_ids as $post_id ) {
|
||||
$order = wc_get_order( $post_id );
|
||||
$order->update_status( $new_status, __( 'Order status changed by bulk edit:', 'woocommerce' ) );
|
||||
do_action( 'woocommerce_order_edit_status', $post_id, $new_status );
|
||||
$changed++;
|
||||
}
|
||||
|
||||
|
|
|
@ -465,6 +465,7 @@ class WC_AJAX {
|
|||
if ( wc_is_order_status( 'wc-' . $status ) && $order_id ) {
|
||||
$order = wc_get_order( $order_id );
|
||||
$order->update_status( $status );
|
||||
do_action( 'woocommerce_order_edit_status', $order_id, $status );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -561,6 +561,7 @@ class WC_Webhook {
|
|||
'order.updated' => array(
|
||||
'woocommerce_process_shop_order_meta',
|
||||
'woocommerce_api_edit_order',
|
||||
'woocommerce_order_edit_status',
|
||||
),
|
||||
'order.deleted' => array(
|
||||
'wp_trash_post',
|
||||
|
|
Loading…
Reference in New Issue