This plugin ” Woocommerce Search order by SKU ” extend the search functionality of woocommerce admin order listing page and it should work with any WooCommerce version installation, since it hooks up to the core functionality of WooCommerce. The search functionality in woocommerce admin order listing page doesn’t search by sku by default.
This simple plugin will extends the search functionality in woocommerce admin order listing page. Just install and activate from admin panel – no any settings required.
Is this plugin work with any wordpress theme?
Yes, this plugin will definitely work with any theme.
Can i customize the button style ?
Yes, you can customize according your theme.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /** * Search product by SKU in Admin Woocommerce Orders */ add_filter('woocommerce_shop_order_search_fields', function ($search_fields ) { $posts = get_posts(array('post_type' => 'shop_order')); foreach ($posts as $post) { $order_id = $post->ID; $order = new WC_Order($order_id); $items = $order->get_items(); foreach ($items as $item) { $product_id = $item['product_id']; $search_sku = get_post_meta($product_id, "_sku", true); add_post_meta($order_id, "_product_sku", $search_sku); } } return array_merge($search_fields, array('_product_sku')); }); |
Download from wordpress plugin directory : Download Demo
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: Plugins, woocommerce, woocommerce sku, wordpress