When the status is changed via bulk actions or by the status button, execute order.updated.

This commit is contained in:
Justin Shreve 2015-06-05 16:43:24 +00:00
parent 816a01a4ec
commit e88c1bfb9e
3 changed files with 3 additions and 0 deletions

View File

@ -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++;
}

View File

@ -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 );
}
}

View File

@ -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',