Shortcode [woocommerce_product_search] uses ?s=input1 query param, but shop widget product search does not clear this search attribute. It then adds a second search param ?ixwpss=input2
Therefor, if the shortcode is used first, then the shop product search is used, the search terms are combined and result in “no results” when there should be results.
In version 2.0.0 of file:
/wp-content/plugins/woocommerce-product-search/lib/views/class-woocommerce-product-search-filter.php:215
$current_url = remove_query_arg( array( ‘ixwpss’, ‘title’, ‘excerpt’, ‘content’, ‘categories’, ‘attributes’, ‘tags’, ‘sku’, ‘lang’, ‘paged’ ), $current_url );
Could be changed to:
$current_url = remove_query_arg( array( ‘s’, ‘ixwpss’, ‘title’, ‘excerpt’, ‘content’, ‘categories’, ‘attributes’, ‘tags’, ‘sku’, ‘lang’, ‘paged’ ), $current_url );
This change in the plugin file in my local environment resulted in the shortcode and the shop widget to be compatible.
Open
Last updated: November 15, 2024
0 comments
Log in to comment on this feature request.