From 35ef031771767afa2879bd370d7a066e5a76b866 Mon Sep 17 00:00:00 2001 From: Tarun Date: Mon, 15 Sep 2014 18:08:14 +0530 Subject: [PATCH] WC order status conflicting with WP post_status (only with 'pending' post_status) --- includes/class-wc-post-data.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-wc-post-data.php b/includes/class-wc-post-data.php index 9cb023dd018..a3b4ff26c03 100644 --- a/includes/class-wc-post-data.php +++ b/includes/class-wc-post-data.php @@ -174,6 +174,10 @@ class WC_Post_Data { $order_title.= ' – ' . date_i18n( 'F j, Y @ h:i A', strtotime( $data['post_date'] ) ); } $data['post_title'] = $order_title; + // Fix: Sometimes conflict with'pending' post_status of WordPress core + if ( isset( $data['post_status']) && 'pending' === $data['post_status']) { + $data['post_status'] = 'wc-' . $data['post_status']; + } } elseif ( 'product' === $data['post_type'] && isset( $_POST['product-type'] ) ) {