Merge branch 'master' of github.com:woothemes/woocommerce
This commit is contained in:
commit
c6ec8dfd26
|
@ -2201,8 +2201,9 @@ abstract class WC_Abstract_Order {
|
|||
*
|
||||
* @param string $new_status Status to change the order to. No internal wc- prefix is required.
|
||||
* @param string $note (default: '') Optional note to add
|
||||
* @param bool $manual is this a manual order status change?
|
||||
*/
|
||||
public function update_status( $new_status, $note = '' ) {
|
||||
public function update_status( $new_status, $note = '', $manual = false ) {
|
||||
if ( ! $this->id ) {
|
||||
return;
|
||||
}
|
||||
|
@ -2218,7 +2219,7 @@ abstract class WC_Abstract_Order {
|
|||
wp_update_post( array( 'ID' => $this->id, 'post_status' => 'wc-' . $new_status ) );
|
||||
$this->post_status = 'wc-' . $new_status;
|
||||
|
||||
$this->add_order_note( trim( $note . ' ' . sprintf( __( 'Order status changed from %s to %s.', 'woocommerce' ), wc_get_order_status_name( $old_status ), wc_get_order_status_name( $new_status ) ) ) );
|
||||
$this->add_order_note( trim( $note . ' ' . sprintf( __( 'Order status changed from %s to %s.', 'woocommerce' ), wc_get_order_status_name( $old_status ), wc_get_order_status_name( $new_status ) ) ), 0, $manual );
|
||||
|
||||
// Status was changed
|
||||
do_action( 'woocommerce_order_status_' . $new_status, $this->id );
|
||||
|
|
|
@ -1446,7 +1446,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' ) );
|
||||
$order->update_status( $new_status, __( 'Order status changed by bulk edit:', 'woocommerce' ), true );
|
||||
do_action( 'woocommerce_order_edit_status', $post_id, $new_status );
|
||||
$changed++;
|
||||
}
|
||||
|
|
|
@ -454,7 +454,7 @@ class WC_Meta_Box_Order_Data {
|
|||
$order = wc_get_order( $post_id );
|
||||
|
||||
// Order status
|
||||
$order->update_status( $_POST['order_status'] );
|
||||
$order->update_status( $_POST['order_status'], '', true );
|
||||
|
||||
// Finally, set the date
|
||||
$date = date_i18n( 'Y-m-d H:i:s', $date );
|
||||
|
|
Loading…
Reference in New Issue