I am trying to create an eCommerce site that allows a user to search product by SKU.

The products that I have in my store are variable products with attributes like: size, color, style, etc.

I currently am using the plugin 'WooCommerce Search by Product SKU'. I believe the plugin works by basing the search on the product variation SKU and then directing the user to the product variations post parent id i.e. the product page of that SKU.

My issue is that none of the actual attributes are selected in the drop down lists they are all set to 'Select'.

How can I code in something so that when I search by the products variable SKU it will direct the user to that product page, but also have the attributes pre selected based on the SKU?

Any help and/or suggestions would be greatly appreciated!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.