Hi,
The variation SKUs as far as I know are stored in the same exact custom field as the normal product SKUs.
Make sure that the product variation post type is selected, as well as the _sku custom field. Keep in mind, that this may only work for the live search feature – the WooCommerce results page in most cases filters out the variations from the results.
Best,
Ernest M.
The product is variable. And their variations have different SKUs. But they are not found in the live search.
In the Seach lite options if I search for custom fields I get “_sku”. I have added “_sku” and “variation_description”.
But I’m not getting search results if I search for a SKU number.
I have Woocomerce configured as normal and the variations are the native Woocomerce variations.
In other search plugins I have found that there are problems searching for variations sku. For example SearchWP needs to include a PHP function:
WooCommerce stores Product Variations as separate posts, so the first step will be to tell SearchWP to store some custom metadata for the parent product
https://searchwp.com/v3/docs/kb/woocommerce-product-variation-skus/
Thank you, I know that.
If you select the product_variation custom post type for search, the plugin will return those as well, and link to the original product.
For example I made a variable product, and made variation #1 SKU: ABCD1234
When I search for 1234, I am getting that variation as the result: https://i.imgur.com/Hlhe3Hq.png
To make sure that is the correct result, on the advanced title and content fields I added the {_sku} field: https://i.imgur.com/nasJDLh.png
Best,
Ernest M.
It works perfectly. Thanks for the support!
You are welcome 🙂
I will mark this as resolved then.
Feel free to reate the plugin if you like it, it is greatly appreciated 🙂
Best,
Ernest M.