diff --git a/includes/data-stores/class-wc-product-data-store-cpt.php b/includes/data-stores/class-wc-product-data-store-cpt.php index e80c48e93c6..15b73c6d2c5 100644 --- a/includes/data-stores/class-wc-product-data-store-cpt.php +++ b/includes/data-stores/class-wc-product-data-store-cpt.php @@ -701,7 +701,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da $value = ''; delete_transient( 'wc_layered_nav_counts_' . $attribute_key ); - + if ( is_null( $attribute ) ) { if ( taxonomy_exists( $attribute_key ) ) { // Handle attributes that have been unset. @@ -1354,6 +1354,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da $type_join WHERE ( posts.post_title LIKE %s + OR posts.post_excerpt LIKE %s OR posts.post_content LIKE %s OR ( postmeta.meta_key = '_sku' AND postmeta.meta_value LIKE %s @@ -1365,6 +1366,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da ORDER BY posts.post_parent ASC, posts.post_title ASC", $like_term, $like_term, + $like_term, $like_term ) // phpcs:enable