woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.3k stars 10.74k forks source link

After upgrade to 8.1.1: On Hold orders are no longer included in Analytics Orders report #40531

Open stgoos opened 11 months ago

stgoos commented 11 months ago

Prerequisites

Describe the bug

I've upgraded to v8.1.1 on September 17th and today I was looking at the Taxes report and the Orders report. While doing that I noticed that none of the On Hold (wc-on-hold) orders were visible in the Orders report (41 in total).

So the Analytics Orders report is off at the moment. The calculations on the Taxes reports seems to be alright after further investigations.

Of the 41 On Hold orders I've in the shop at the moment, 37 have been created whilst running v8.1.1. The other 4 have been created whilst running v8.0.3.

I already tried emptying the Analytics reports tables and reimporting all orders. Unfortunately the result remains the same: no On Hold orders visible in the Analytics Orders report.

Expected behavior

I would expect to see all my orders, including the On Hold ones, as I don't have any Exclusions setup for Analytics.

Actual behavior

All orders with order status On Hold (wc-on-hold) are no longer visible in the Analytics Orders report.

Steps to reproduce

Create new order with payment by bank transfer so the order reaches the On Hold status.

Go to Analytics and they won't show up there.

WordPress Environment

`

WordPress Environment

WordPress address (URL): https://domain.com/shop Site address (URL): https://domain.com/shop WC Version: 8.1.1 REST API Version: ✔ 8.1.1 WC Blocks Version: ✔ 10.9.3 Action Scheduler Version: ✔ 3.6.2 Log Directory Writable: ✔ WP Version: 6.3.1 WP Multisite: ✔ WP Memory Limit: 512 MB WP Debug Mode: ✔ WP Cron: – Language: en_US External object cache: –

Server Environment

Server Info: Apache PHP Version: 8.0.28 PHP Post Max Size: 32 MB PHP Time Limit: 60 PHP Max Input Vars: 1000 cURL Version: 7.87.0 OpenSSL/1.1.1p

SUHOSIN Installed: – MySQL Version: 10.5.22-MariaDB-cll-lve-log Max Upload Size: 5 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 8.1.1 WC Database Prefix: wp2 Total Database Size: 191.22MB Database Data Size: 127.61MB Database Index Size: 63.61MB wp_2_woocommerce_sessions: Data: 0.11MB + Index: 0.02MB + Engine InnoDB wp_2_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_2_woocommerce_order_items: Data: 1.52MB + Index: 0.36MB + Engine InnoDB wp_2_woocommerce_order_itemmeta: Data: 10.52MB + Index: 8.03MB + Engine InnoDB wp_2_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_2_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_actionscheduler_actions: Data: 2.52MB + Index: 1.97MB + Engine InnoDB wp_2_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_actionscheduler_logs: Data: 1.52MB + Index: 1.89MB + Engine InnoDB wp_2_commentmeta: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_2_comments: Data: 10.52MB + Index: 9.09MB + Engine InnoDB wp_2_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_options: Data: 9.47MB + Index: 0.33MB + Engine InnoDB wp_2_pmxe_exports: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_2_pmxe_google_cats: Data: 0.38MB + Index: 0.00MB + Engine InnoDB wp_2_pmxe_posts: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_2_pmxe_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_pmxi_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_pmxi_hash: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_pmxi_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_pmxi_images: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_pmxi_imports: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_2_pmxi_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_pmxi_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_postmeta: Data: 46.56MB + Index: 29.11MB + Engine InnoDB wp_2_posts: Data: 6.52MB + Index: 1.55MB + Engine InnoDB wp_2_signups: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_2_termmeta: Data: 0.16MB + Index: 0.16MB + Engine InnoDB wp_2_terms: Data: 0.14MB + Index: 0.16MB + Engine InnoDB wp_2_term_relationships: Data: 0.50MB + Index: 0.27MB + Engine InnoDB wp_2_term_taxonomy: Data: 0.22MB + Index: 0.17MB + Engine InnoDB wp_2_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_2_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_wc_customer_lookup: Data: 0.14MB + Index: 0.09MB + Engine InnoDB wp_2_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_2_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_2_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_wc_order_product_lookup: Data: 2.02MB + Index: 2.11MB + Engine InnoDB wp_2_wc_order_stats: Data: 2.11MB + Index: 0.86MB + Engine InnoDB wp_2_wc_order_tax_lookup: Data: 0.13MB + Index: 0.13MB + Engine InnoDB wp_2_wc_product_attributes_lookup: Data: 0.39MB + Index: 0.28MB + Engine InnoDB wp_2_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_wc_product_meta_lookup: Data: 0.09MB + Index: 0.13MB + Engine InnoDB wp_2_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_woocommerce_exported_csv_items: Data: 20.55MB + Index: 1.52MB + Engine InnoDB wp_2_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_wpmailsmtp_emails_log: Data: 1.52MB + Index: 0.03MB + Engine InnoDB wp_2_wpmailsmtp_email_tracking_events: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_2_wpmailsmtp_email_tracking_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_2_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_2_xyz_ihs_short_code: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_blogmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_blogs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_registration_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_signups: Data: 0.05MB + Index: 0.06MB + Engine InnoDB wp_site: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_sitemeta: Data: 1.06MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 7.52MB + Index: 4.03MB + Engine InnoDB wp_users: Data: 0.19MB + Index: 0.16MB + Engine InnoDB

Post Type Counts

attachment: 1351 custom_css: 1 nav_menu_item: 34 page: 8 portfolio_project: 1 product: 499 revision: 285 rtmedia_album: 3 shop_order: 10342 shop_order_refund: 3 user_request: 1 vc_grid_item: 1 vc4_templates: 8 vcv_templates: 9

Security

Secure connection (HTTPS): ✔ Hide errors from visitors: ❌Error messages should not be shown to visitors. (I've enabled WP_DEBUG only for my IP)

Active Plugins (23)

Classic Editor: by WordPress Contributors – 1.6.3 Crocal Extension: by Euthemians Team – 2.0.9 Duplicate Page: by mndpsingh287 – 4.5.3 Imsanity: by Exactly WWW – 2.8.3 JSON REST API for Multisite: by Ryan McCue – 0.1 Product Customer List for WooCommerce: by Kokomo – 3.1.5 WooCommerce Customer/Order/Coupon Export: by SkyVerge – 5.5.0 WooCommerce Product CSV Import Suite: by WooCommerce – 1.10.54 WooCommerce Product Dependencies: by SomewhereWarm – 1.2.8 WooCommerce Table Rate Shipping: by Bolder Elements – 4.3.8 WooCommerce: by Automattic – 8.1.1 Nav Menu Roles: by Kathy Darling – 2.1.2 Members: by MemberPress – 3.2.8 Multisite User Management: by Brent Shepherd – 1.1 WP Mail SMTP Pro: by WP Mail SMTP – 3.9.0

Inactive Plugins (58)

Elementor: by Elementor.com – 3.16.4 Gravity Forms: by Gravity Forms – 2.7.14 Gravity Forms Chained Selects Add-On: by Gravity Forms – 1.6 Gravity Forms Conversational Forms Add-On: by Gravity Forms – 1.0.0 Gravity Forms Email Blacklist: by CrossPeak Software – 2.5.5 Gravity Forms Moderation Add-On: by Gravity Forms – 1.0 Gravity Forms Polls Add-On: by Gravity Forms – 3.9 Gravity Forms Survey Add-On: by Gravity Forms – 3.8 Gravity Forms User Registration Add-On: by Gravity Forms – 5.2.0 Imagify: by Imagify – Optimize Images & Convert WebP – 2.1.2 Newsletter: by Stefano Lissa & The Newsletter Team – 7.9.5 Newsletter - Addons Manager: by The Newsletter Team – 1.2.0 Newsletter - Archive: by The Newsletter Team – 4.1.1 Newsletter - WP Users Integration: by The Newsletter Team – 1.3.5 Page Links To: by Mark Jaquith – 3.3.6 Redis Object Cache: by Till Krüss – 2.4.4 Redux Framework: by Team Redux – 4.4.7 Visual Composer: by visualcomposer.com – 45.5.0 WooCommerce External Product Embed: by Caleb Burks – 3.0.0 WPBakery Page Builder: by Michael M - WPBakery.com – 7.0

Dropin Plugins (1)

maintenance.php: maintenance.php

Must Use Plugins (2)

scc-mu-config.php: by –

Settings

API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: – Enforce Approved Product Download Directories: – HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: –

WC Pages

Shop base: #31577 - /all-products/ Cart: #8707 - /basket/ Checkout: #8708 - /checkout/ My account: ❌ Page does not contain the [woocommerce_my_account] shortcode. Terms and conditions: ❌ Page not set

Theme

Name: Crocal: 2-shop Version: 2.1.0 Author URL: https://domain.com Child Theme: ✔ Parent Theme Name: Crocal Parent Theme Version: 2.1.0 Parent Theme Author URL: https://euthemians.com WooCommerce Support: ✔

Templates

Overrides: crocal/woocommerce/content-product.php crocal/woocommerce/content-single-product.php crocal/woocommerce/loop/loop-end.php crocal/woocommerce/loop/loop-start.php crocal/woocommerce/single-product/product-image.php crocal/woocommerce/single-product/product-thumbnails.php crocal/woocommerce/single-product/related.php crocal/woocommerce/single-product/up-sells.php crocal/woocommerce/single-product.php crocal/woocommerce/content-product_cat.php

Admin

Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page

Disabled Features: customize-store minified-js new-product-management-experience product-variation-management settings async-product-editor-category-field

Daily Cron: ✔ Next scheduled: 2023-10-01 15:05:20 +02:00 Options: ✔ Notes: 8 Onboarding: completed

WooCommerce Customer/Order/Coupon Export

Automated exports: 0 Custom formats: 1 Next export: Not scheduled

Action Scheduler

Canceled: 20 Oldest: 2023-10-01 13:28:57 +0200 Newest: 2023-10-01 13:28:57 +0200

Complete: 6,250 Oldest: 2023-08-31 14:42:02 +0200 Newest: 2023-10-01 14:06:03 +0200

Failed: 1 Oldest: 2023-08-05 00:19:36 +0200 Newest: 2023-08-05 00:19:36 +0200

Pending: 8 Oldest: 2023-10-01 15:06:02 +0200 Newest: 2023-10-02 14:06:03 +0200

Status report information

Generated at: 2023-10-01 14:12:05 +02:00 `

Isolating the problem

stgoos commented 11 months ago

Updated the ticket after further investigations.

The problem seems to be ONLY with the Analytics Orders report and not with the Analytics Taxes report. The calculations of the Taxes report do include the taxes of the On Hold orders.

I double checked this by creating my own database query/view to validate the calculations. I also triple checked it with a manual calculation after exporting all orders via WooCommerce > Export (/shop/wp-admin/admin.php?page=wc_customer_order_csv_export).