Merge branch 'master' of github.com:woocommerce/woocommerce

This commit is contained in:
Claudio Sanches 2019-06-02 18:32:56 -03:00
commit 15fa45af69
1 changed files with 16 additions and 6 deletions

View File

@ -1543,12 +1543,22 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
return $custom_results;
}
$post_types = $include_variations ? array( 'product', 'product_variation' ) : array( 'product' );
$post_statuses = current_user_can( 'edit_private_products' ) ? array( 'private', 'publish' ) : array( 'publish' );
$type_where = '';
$status_where = '';
$limit_query = '';
$term = wc_strtolower( $term );
$post_types = $include_variations ? array( 'product', 'product_variation' ) : array( 'product' );
$type_where = '';
$status_where = '';
$limit_query = '';
$term = wc_strtolower( $term );
/**
* Hook woocommerce_search_products_post_statuses.
*
* @since 3.7.0
* @param array $post_statuses List of post statuses.
*/
$post_statuses = apply_filters(
'woocommerce_search_products_post_statuses',
current_user_can( 'edit_private_products' ) ? array( 'private', 'publish' ) : array( 'publish' )
);
// See if search term contains OR keywords.
if ( strstr( $term, ' or ' ) ) {