Continue reading WooCommerce 4.4 problems

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, next version of Relevanssi will…

Read more WooCommerce 4.4 problems 4 Comments on WooCommerce 4.4 problems
Continue reading Return only exact matches for SKU searches

Return only exact matches for SKU searches

This little filter function works on relevanssi_hits_filter. When a search query is made that matches a SKU (or any other custom field, but SKUs are the most likely scenario here), only results that match the SKU will be returned. In order for this to work, Relevanssi must be set to index the _sku custom field…

Read more Return only exact matches for SKU searches 1 Comment on Return only exact matches for SKU searches
Continue reading Indexing product variation SKUs for main product

Indexing product variation SKUs for main product

Relevanssi can index product and product variation SKUs for WooCommerce products: just add _sku to list of custom fields to index. However, if you want to find the main product when searching for the product variation SKU, you need some extra code. Just add this function to the theme functions.php and rebuild the index: This…

Read more Indexing product variation SKUs for main product 14 Comments on Indexing product variation SKUs for main product
Continue reading Hidden WooCommerce products in search

Hidden WooCommerce products in search

Relevanssi by default shows out-of-stock and excluded from catalog WooCommerce products in the search results, but hides those set to excluded from search (before 2.2.2 and 4.1.2 the default behaviour was to show all products). It is quite easy to make Relevanssi not to display hidden products in the results. The best way is to…

Read more Hidden WooCommerce products in search 21 Comments on Hidden WooCommerce products in search
Continue reading WooCommerce popularity and price sorting

WooCommerce popularity and price sorting

Many WooCommerce users use search sorting that allows users to sort by popularity or price. Unfortunately while Relevanssi works fine with WooCommerce, those sorts do not work. Relevanssi doesn’t know about price or popularity, and the sorting assumes there’s default WP search underneath. Relevanssi doesn’t do meta field sorting as easily as the default WP…

Read more WooCommerce popularity and price sorting 39 Comments on WooCommerce popularity and price sorting