WooCommerce: Auto-Hide Products Without a Featured Image

In WooCommerce, having a well-organized product catalog is essential for user experience and conversions. However, some store owners may forget to add featured images to products, leading to empty placeholders that can make the shop look incomplete or unprofessional.

If you want to ensure that only products with a featured image are displayed, you need a way to automatically hide those without one.

Instead of manually checking and updating each product, you can use a simple PHP snippet to exclude products missing a featured image from your shop, category, and search pages. This approach keeps your store looking polished while preventing customers from encountering blank product thumbnails. The best part? It only takes a few lines of code to implement.

Below, I’ll show you how to add this snippet to your theme’s functions.php file or a custom plugin, ensuring that only properly set up products appear in your WooCommerce store.

Continue reading WooCommerce: Auto-Hide Products Without a Featured Image

WooCommerce: Search Orders By 2-Letter Country Code [HPOS]

WooCommerce’s order search function is essential for store admins, but with the introduction of High-Performance Order Storage (HPOS), searching by billing or shipping country code may no longer work as expected.

If you’re used to quickly filtering orders by country, this limitation can be frustrating. Fortunately, there’s a simple way to bring back this functionality using a custom code snippet.

In this post, we’ll walk through how to modify the WooCommerce order search to support two-letter country codes, making it easier to find the orders you need. Let’s dive into the solution!

Continue reading WooCommerce: Search Orders By 2-Letter Country Code [HPOS]

Optimizing Ajax Filters for Large WooCommerce Stores

In a recent Business Bloomer Club discussion, a WooCommerce store owner managing 50,000 products sought advice on the best-performing Ajax filtering solution for their extensive catalog.

Traditional filters such as YITH proved too slow, highlighting the need for a more robust, scalable approach. Various community members shared insights on different solutions, including plugins and custom setups, each with unique strengths suited to high-product-volume stores.

Here’s a breakdown of the options and best practices discussed.

Continue reading Optimizing Ajax Filters for Large WooCommerce Stores

WooCommerce: Customize Product Search Form HTML

The “Search products…” WooCommerce form usually appears in the website header and/or the Shop page sidebar based on your theme settings and widget setup.

It usually features an input form with a magnifying glass icon (unless your theme customizes it via CSS), without a visible search button, and on enter it redirects users to the search result page.

Case study: most WooCommerce Ajax Search plugins target the WooCommerce product search form input, so that when you start typing, the “instant search results” window pops up. However, I needed to disable this behavior on certain subsites/languages and the only workaround here was to add a class to the search form input, so that I could target it in my Ajax plugin selector exclusions.

Even if the above scenario is very unlikely, the challenge is still valid. So, how do we customize the HTML of the “Search products…” WooCommerce form (so, not the CSS, but the actual HTML output)? Let’s go!

Continue reading WooCommerce: Customize Product Search Form HTML

WooCommerce Development: 8 Trends & Advancements

In the sphere of WooCommerce development, innovation continues at a breakneck pace, so it’s important for businesses to stay updated on current trends and advancements.

From enhancing in-app customer support solutions to embracing AI (Artificial Intelligence), sustainability practices, and voice search optimization, the future is packed with possibilities. 

To improve your understanding of what lies ahead, read on as we provide you with insightful knowledge about significant trends shaping this field.

Our goal is to make you learn at least one new thing about the future of WooCommerce and the ecommerce ecosystem – feel free to share what that is in the comments!

Continue reading WooCommerce Development: 8 Trends & Advancements

WooCommerce: Search Products By Custom Field (Backend)

In WooCommerce, there are two kinds of search: the customer one (frontend) and the admin one (backend). We’ve already covered how to let customers search into custom field values on top of the default product title and description, so this time we’ll talk about the backend search.

Let’s say, as a WooCommerce store admin, that you’ve added a product custom field (e.g. “gtin“), and you want to make sure the backend search also returns products where “gtin” is equal to the search term. The snippet below will help you do that. Enjoy!

Continue reading WooCommerce: Search Products By Custom Field (Backend)

WooCommerce: Search Products By SKU (Frontend)

The frontend WooCommerce product search, for some reason, doesn’t work for SKU values. If it does, then your theme developers were smart enough to include this in their code, because this is a big problem especially for B2B stores.

Today, we’ll study how to alter the product search query, as well as the wc_get_product_id_by_sku() function, which is super helpful to determine the product ID for a given SKU. Enjoy!

Continue reading WooCommerce: Search Products By SKU (Frontend)

WooCommerce: How to Make Your Store More Mobile-Friendly

In April 2015, Google released an algorithm update that favored mobile-friendly pages in Google’s mobile oriented search results. This algorithm was named “Mobilegeddon”, and it gave leverage to those sites that display perfectly on smartphones and other mobile devices. 

Clearly, having a mobile-friendly website not only makes it easier to engage and convert mobile using customers, but also paves the way for better ranking and visibility on search engines.

While it is good practice to get a WooCommerce mobile app for your store, it is also important to optimize your website and make it more mobile-friendly.

We will first discover the benefits of making your website more mobile-friendly, and then learn the tips and tricks to optimize it for small devices.

Continue reading WooCommerce: How to Make Your Store More Mobile-Friendly

WooCommerce: Redirect Specific Product Search To Custom URL

Go to a WooCommerce website. Search for a product. Get to the search results page, which displays from 0 to N products based on the search term, sorted by relevancy. Easy.

Now, let’s imagine you have a custom landing page for “Tables”, and you want people searching for “tables” to go to that page instead of the default search result page. Quite easy as well – thanks to a neat PHP snippet we will feature today.

Enjoy!

Continue reading WooCommerce: Redirect Specific Product Search To Custom URL

WooCommerce: Alter Product Search @ Manual Admin Orders

Ok, we’re in a niche of a niche this time – manual orders (orders created by the WooCommerce administrator). If you’re familiar with that, the admin would click on “Add order“, fill out the billing & shipping information, and then move to the order items section, where they can add products to the order.

As soon as they click on “Add items” > “Add products“, a table displays with a product search and quantity input. That’s exactly where we’re working today: what if you have 10,000 products in your store, but only create manual invoices with the same 2-3 products? In this case scenario, it makes no sense to search for the whole 10,000 product list and wait for WooCommerce to return a result (slowly) – it’s much more efficient to reduce that list to a specific category or a list of IDs so that the search operations can be faster.

Here’s how it’s done. Enjoy!

Continue reading WooCommerce: Alter Product Search @ Manual Admin Orders

WooCommerce: Search By Custom Field (Frontend)

The default WooCommerce frontend product search returns results based on whether the search term is present in the product title, short and long description. Also, you can optionally search products by SKU.

But what if you also want to search for a custom field value e.g. you have a custom field called “_brand” and you want to get the products where “_brand” is equal to “apple“?

Now, I’m not sure I’ve explained this in plain English, so let’s take a look at a practical example. Enjoy!

Continue reading WooCommerce: Search By Custom Field (Frontend)

WooCommerce: Disable Single Search Result Redirect

You have a WooCommerce product called “VREIUTERTKXYU“. You search for “VREIUTERTKXYU” (exact match). WooCommerce, by default, redirects you to the single product page as there is only 1 possible search result (as opposed to sending you to the search result page).

In today’s tutorial, we will be deactivating this WooCommerce function and go back to the normal (at least, to me) behavior: even if there is an exact match in a search (single search result), we still want to display the search page.

The screenshot that follows gives you a working proof, once the snippet you find below is active. Enjoy!

Continue reading WooCommerce: Disable Single Search Result Redirect

WooCommerce Product Search Plugins to Enhance Customer Experience

Say you’re at a clothing store. You know exactly what you want to buy but have to go through the store’s entire catalog to find the product. Sounds like a pointless hassle, right?

Now imagine you had a salesperson to assist you. They’d ask you a few questions – What are you looking for? What’s your budget? What size and color do you want? – and voila, you’ll get just what you wanted. 

This is exactly what a product search feature on your store can do for your customers. 

Product search allows customers to find items they’re looking for faster, improving their experience at your store and increasing the chances of a sale. 

Now, if you have a small WooCommerce store with a handful of products, navigating your website and finding products will be fairly easy. 

But if you offer a wide variety of products spread across categories, product search becomes an essential feature. 

Given its importance, WooCommerce comes with a default search form, which is great for getting started with this feature on your store. However, this form offers only basic features, letting customers search for products mainly by their names. 

For more advanced features – like live search, autocorrection, and providing more relevant results – Woo Product Search plugins can prove to be helpful. 

We’ve done the legwork and compiled a list of some of the best WooCommerce Product Search plugins that can enhance your customers’ shopping experience. Let’s explore them!

Continue reading WooCommerce Product Search Plugins to Enhance Customer Experience