Update status only when its changed.

This commit is contained in:
Vedanshu Jain 2023-06-13 21:12:03 +05:30
parent 0f8d274d7f
commit 59bb1f8365
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Update status only when it's changed.

View File

@ -1738,8 +1738,8 @@ FROM $order_meta_table
$changes['type'] = $order->get_type();
// Make sure 'status' is correct.
if ( array_key_exists( 'status', $column_mapping ) ) {
// Make sure 'status' is correctly prefixed.
if ( array_key_exists( 'status', $column_mapping ) && array_key_exists( 'status', $changes ) ) {
$changes['status'] = $this->get_post_status( $order );
}