Skip to main contentSkip to footer

WooCommerce 4.4 problems

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.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

SearchWP Live Ajax Search

…One example is searching for attachments. By default, SearchWP Live Ajax Search doesn’t include any attachments in the search results. The post type is not a problem, but the post status is: SearchWP Live Ajax Search includes only posts with the post status publish, while attachments have a status of…Relevanssi doesn’t ship with a live search or autocomplete feature that would display results as the user types the search terms. There are many other plugins that provide this functionality, but few of these plugins work with Relevanssi. SearchWP Live Ajax Search is the best one that does. It’s very……to include private posts for the users who are allowed to see them. Just removing the post_status parameter will include drafts in the results. Normally drafts shouldn’t appear in searches, but since the SearchWP Live Ajax Search is an AJAX search, it is done in admin context, where drafts are…

Modernize
Modernize is a neat Premium theme that has a problem with Relevanssi. Relevanssi highlighting can cause problems on Modernize search…

Related Posts:

Comment Section:

7 Comments. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed