Fix for 0.6.0 not working
-
This wasn’t working for a site of mine. I took a quick look into the code and made some changes.
woocommerce-searchbysku.php lines 27-28:
global $pagenow, $wpdb, $wp; if ((is_admin() && 'edit.php' != $pagenow) || !is_search() || !isset($wp->query_vars['s']) || 'product' != $wp->query_vars['post_type']) {
to
global $pagenow, $wpdb, $wp, $wp_query; if ((is_admin() && 'edit.php' != $pagenow) || !is_search() || !isset($wp->query_vars['s']) || !in_array('product', $wp_query->query_vars['post_type']) ) {
It looked like the post_type check wasn’t matching up correctly so the search by sku functionality wasn’t working.
https://www.ads-software.com/plugins/search-by-sku-for-woocommerce/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Fix for 0.6.0 not working’ is closed to new replies.