Make changes per review
This commit is contained in:
parent
18d00cadd0
commit
3c27123aa2
|
@ -638,7 +638,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
}
|
||||
|
||||
// If the old status is set but unknown (e.g. draft) assume its pending for action usage.
|
||||
if ( $old_status && ( ( ! in_array( 'wc-' . $old_status, $this->get_valid_statuses(), true ) && ! in_array( $old_status, $status_exceptions, true ) ) || 'auto-draft' === $old_status ) ) {
|
||||
if ( $old_status && ( 'auto-draft' === $old_status || ( ! in_array( 'wc-' . $old_status, $this->get_valid_statuses(), true ) && ! in_array( $old_status, $status_exceptions, true ) ) ) ) {
|
||||
$old_status = 'pending';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ class DataSynchronizer implements BatchProcessorInterface {
|
|||
self::add_action( 'deleted_post', array( $this, 'handle_deleted_post' ), 10, 2 );
|
||||
self::add_action( 'woocommerce_new_order', array( $this, 'handle_updated_order' ), 100 );
|
||||
self::add_action( 'woocommerce_update_order', array( $this, 'handle_updated_order' ), 100 );
|
||||
self::add_action( 'wp_scheduled_auto_draft_delete', array( $this, 'delete_auto_draft_orders' ) );
|
||||
self::add_action( 'wp_scheduled_auto_draft_delete', array( $this, 'delete_auto_draft_orders' ), 9 );
|
||||
|
||||
self::add_filter( 'woocommerce_feature_description_tip', array( $this, 'handle_feature_description_tip' ), 10, 3 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue