From 91ea67d94c1355ad7057921e09d15e6e6a4648cb Mon Sep 17 00:00:00 2001 From: Kevin Ruscoe Date: Sat, 9 Jan 2021 15:11:25 +0000 Subject: [PATCH] Clean array to make the list a little easier to understand --- includes/class-wc-post-data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-post-data.php b/includes/class-wc-post-data.php index f7a8d5a1482..f8ba9d902d1 100644 --- a/includes/class-wc-post-data.php +++ b/includes/class-wc-post-data.php @@ -500,7 +500,7 @@ class WC_Post_Data { * @return string */ public function wp_untrash_post_status( $new_status, $post_id, $previous_status ) { - $post_types = array_merge( wc_get_order_types(), array( 'product', 'product_variation' ) ); + $post_types = array( 'shop_order', 'shop_coupon', 'product', 'product_variation' ); if ( in_array( get_post_type( $post_id ), $post_types, true ) ) { $new_status = $previous_status;