Advertisement
AlejandroS13

WC Analytics sql error

Jun 23rd, 2022
678
16 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [23-Jun-2022 08:33:07 UTC] PHP Warning:  mysqli_query(): (21000/1242): Subquery returns more than 1 row in /mnt/BLOCKSTORAGE/home/219768.cloudwaysapps.com/esbfkjneej/public_html/wp-includes/wp-db.php on line 2169
  2. [23-Jun-2022 08:33:07 UTC] WordPress database error Subquery returns more than 1 row for query
  3.             SELECT
  4.                 DISTINCT wp_wc_order_stats.order_id, wp_wc_order_stats.parent_id, wp_wc_order_stats.date_created, wp_wc_order_stats.date_created_gmt, REPLACE(wp_wc_order_stats.status, 'wc-', '') as status, wp_wc_order_stats.customer_id, wp_wc_order_stats.net_total, wp_wc_order_stats.total_sales, wp_wc_order_stats.num_items_sold, (CASE WHEN wp_wc_order_stats.returning_customer = 0 THEN 'new' ELSE 'returning' END) as customer_type, (SELECT meta_value FROM wp_postmeta WHERE post_id = wp_wc_order_stats.order_id AND meta_key = 'wpml_language') AS 'language' , wcml_language_postmeta.meta_value AS language
  5.             FROM
  6.                 wp_wc_order_stats
  7.                 LEFT JOIN wp_postmeta wcml_language_postmeta ON wcml_language_postmeta.post_id = IF( wp_wc_order_stats.parent_id = 0, wp_wc_order_stats.order_id, wp_wc_order_stats.parent_id )
  8.             WHERE
  9.                 1=1
  10.                 AND wp_wc_order_stats.status NOT IN ( 'wc-auto-draft','wc-trash','wc-pending','wc-failed','wc-cancelled','wc-checkout-draft' ) AND wp_wc_order_stats.date_created <= '2022-06-23 23:59:59' AND wp_wc_order_stats.date_created >= '2022-06-01 00:00:00' AND wcml_language_postmeta.meta_key = 'wpml_language'
  11.        
  12.                 ORDER BY
  13.                     date_created desc
  14.             LIMIT 0, 25 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Automattic\WooCommerce\Admin\API\Reports\Orders\Controller->get_items, Automattic\WooCommerce\Admin\API\Reports\Orders\Query->get_data, WC_Data_Store->__call, Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore->get_data
  15. [23-Jun-2022 08:33:07 UTC] 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 ')' at line 17 for query SELECT
  16.                 order_id,
  17.                 product_id,
  18.                 variation_id,
  19.                 post_title as product_name,
  20.                 product_qty as product_quantity
  21.             FROM wp_posts
  22.             JOIN
  23.                 wp_wc_order_product_lookup
  24.                 ON wp_posts.ID = (
  25.                     CASE WHEN variation_id > 0
  26.                         THEN variation_id
  27.                         ELSE product_id
  28.                     END
  29.                 )
  30.             WHERE
  31.                 order_id IN ()
  32.              made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Automattic\WooCommerce\Admin\API\Reports\Orders\Controller->get_items, Automattic\WooCommerce\Admin\API\Reports\Orders\Query->get_data, WC_Data_Store->__call, Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore->get_data, Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore->include_extended_info, Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore->get_products_by_order_ids
  33. [23-Jun-2022 08:33:07 UTC] 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 ')' at line 5 for query SELECT order_id, coupon_id, post_title as coupon_code
  34.                 FROM wp_posts
  35.                 JOIN wp_wc_order_coupon_lookup ON wp_wc_order_coupon_lookup.coupon_id = wp_posts.ID
  36.                 WHERE
  37.                     order_id IN ()
  38.                  made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, Automattic\WooCommerce\Admin\API\Reports\Orders\Controller->get_items, Automattic\WooCommerce\Admin\API\Reports\Orders\Query->get_data, WC_Data_Store->__call, Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore->get_data, Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore->include_extended_info, Automattic\WooCommerce\Admin\API\Reports\Orders\DataStore->get_coupons_by_order_ids
  39.  
Advertisement
RAW Paste Data Copied
Advertisement