Hi there!
By default, the native WooCommerce product search widget does not look into product tags. It strictly queries the database using standard WordPress search parameters, which only look at the following fields:
- Product Title
- Product Content (the main description)
- Product Excerpt (the short description)
If a customer types a term that only exists as a product tag, the native search widget will not surface that product.
Since your goal is to keep your layout lightweight without introducing heavy plugins, you have two native or near-native options to handle this:
1. Use the Native “Filter Products by Tag” Widget (Alternative Approach)
Instead of relying on a keyword search bar to find tags, you can use the built-in WooCommerce widget designed specifically for this task.
- Go to Appearance > Widgets (or the Site Editor if using a Block Theme).
- Add the Filter Products by Tag block/widget to your sidebar or widget area.
- This creates a lightweight, clickable list or dropdown of your tags that filters the shop page automatically without a single line of extra code or plugins.
2. Custom Code Snippet:
If a unified keyword search field is a strict requirement for your design, you can add a lightweight PHP snippet to your theme’s functions.php file (or via a functionality plugin) to alter the search query. This forces the default search to include product tags (product_tag) in its loop without requiring a dedicated third-party search plugin.
If you need more in-depth support or want to consider professional assistance for customization, I can recommend WooExperts and Codeable.io as options for getting professional help. Alternatively, you can also ask your development questions in the WooCommerce Community Slack as custom code falls outside our usual scope of support.