In this post I’m going to show you how to add custom admin product search field in WooCommerce. This post is based on our Custom WooCommerce Plugin Development tutorial. If you are not novice and are an experienced WooCommerce developer no need to go through manufacturer plugin post. Or you can just download the plugin and install it to work with below code.
Download Link: WooCommerce Manufacturer Plugin
Admin Products Listing Page
The image shows the search field added on the WooCommerce products listing page. This field will search the products related to chosen manufacturer.
The code below will add a dropdown that will populate the Titles from Manufacturer Custom Post Type. The Action Hook restrict_manage_posts will add the search dropdown. The Filter Hook parse_query will attach our search field submitted data to the database query.
Use the following code to child theme functions.php file or you can create it as WordPress plugin to add custom admin product search field in WooCommerce.
Flatsome Theme Customization
7 Things You Should Never Do With Your WooCommerce Store
Product Tabs in WooCommerce
Display WooCommerce Discount to Customer