Skip to main content

Filter products from WooCommerce product search input

I had an issue that sometimes users are selecting wrong variation on order screen when manually adding orders in WooCommerce.
When searching for products, search filter is returning variable product and all of his variations.
Now because you actually need to select variation instead of parent product itself this can be confusing for some users.

Filter below is filtering ‘variable’ product from ‘WooCommerce > Orders’ screen, when adding new order or when editing existing.
Please read trough code comments for further explanation.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please don’t paste any HTML, Js or PHP code into comments box, use pastebin.com or similar service to share code examples.

Characters left: 1000