Updating WooCommerce to version 4.4 breaks Relevanssi searches. After updating WooCommerce to version 4.4, Relevanssi searches no longer find results.
This problem is caused by changes in WooCommerce. Those who are interested in the details can go read the GitHub issue I created. For those interested in solving the problem, the next version of Relevanssi will include a fix and meanwhile, you can fix the problem by adding this to your site:
add_action( 'woocommerce_before_shop_loop', 'relevanssi_wc_reset_loop' ); function relevanssi_wc_reset_loop() { global $wp_query; if ( $wp_query->is_search ) { wc_reset_loop(); } }
This little function fixes the problem in most cases (please let me know if you have a case where this does not solve the problem!).
Update 21.8.2020: This page originally offered a one-liner solution. The smaller solution works but may have side effects. The new version targets only search queries.
Update 26.8.2020: This fix is no longer necessary with Relevanssi Premium 2.10.1 and Relevanssi free 4.8.1.
Great, it works for me. Thanks.
Thank you for the rapid response and temporary fix until the next version of Relevanssi comes out. Used it on two sites today and it worked perfectly.
hi it does not solve the problem for me
Alireza, please post a support question on the WP.org support forums with more details: which theme are you using, what exactly happens and so on.
Hi
I’ve installed Relevansi version 4.13.0 on my website. It work with Woocommerce. Unfortunatelly, when I type “M” or “Maintenant” on https://vins-authentiques.ch/boutique/ it doesnt’ find anything
I controlled everything I could but no way. Does somebody help me?
Thank you in advance for your suppport
Eric
Eric, “maintenant” is a stopword in French, so remove it from the stopword list and reindex to be able to search for it.
Merci Mikko. You save me!
I whish you a great day