Consider ‘auto-draft’ the same as ‘pending’ for orders
This for backwards compat with CPT
This commit is contained in:
parent
4e16e6117b
commit
18d00cadd0
|
@ -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 ) ) {
|
||||
if ( $old_status && ( ( ! in_array( 'wc-' . $old_status, $this->get_valid_statuses(), true ) && ! in_array( $old_status, $status_exceptions, true ) ) || 'auto-draft' === $old_status ) ) {
|
||||
$old_status = 'pending';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue