Prior to upgrading a client site to woocommerce 3.0, SEARCH ORDERS worked wile SEARCH EVERYTHING active. AFTER upgrade search orders went to hell. Not only did it return ZERO results, it actually was generating a mySQL query error similar to…
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘))) AND ( ( wp_postmeta.meta_key = ‘_customer_user’ AND wp_postmeta.meta_val’ at line 1]
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ((())) AND ( ( wp_postmeta.meta_key = ‘_customer_user’ AND wp_postmeta.meta_value = ‘4’ ) ) AND wp_posts.post_type = ‘shop_order’ AND ((wp_posts.post_status = ‘wc-pending’ OR wp_posts.post_status = ‘wc-processing’ OR wp_posts.post_status = ‘wc-on-hold’ OR wp_posts.post_status = ‘wc-completed’ OR wp_posts.post_status = ‘wc-cancelled’ OR wp_posts.post_status = ‘wc-refunded’ OR wp_posts.post_status = ‘wc-failed’ OR wp_posts.post_status = ‘wc-credit-release’ OR wp_posts.post_status = ‘wc-credit-hold’ OR wp_posts.post_status = ‘wc-export-error’ OR wp_posts.post_status = ‘wc-shipping’ OR wp_posts.post_status = ‘wc-back-order’)) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 20
Painstakingly, we de-activated/re-activated every plugin individually and SEARCH EVERYTHING v8.1.9 appears to be creating the conflict in the woo v3.0.1 search order function, (config: WP v 4.6.4, php v5.6.30 and mysql v5.6.35).
regards
DocFX