Add post_excerpt to product search
This commit is contained in:
parent
c4b3bd0114
commit
3df5a479f9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue