• Resolved updatediva

    (@updatediva)


    An error has cropped up in an established WooCommerce install. An order comes in for one or two products, but the invoice detail is showing a higher item count and incorrect per/item price. However the total is correct, and the shipping details are showing the correct order details. How is this happening and how do I correct it? This is all in the ‘Orders’ section of WooCommerce, and is being repeated in our invoicing generation software.

    Screenshot of the order processing page in WooCommerce: https://imgur.com/OqxFIzX

    There are no fatal errors in the WooCommerce error log. WooCommerce status:

    ` WordPress Environment
    
    WordPress address (URL): https://hfcsa.org<br>Site address (URL): https://hfcsa.org<br>WC Version: 8.5.2<br>REST API Version: ? 8.5.2<br>WC Blocks Version: ? 11.8.0-dev<br>Action Scheduler Version: ? 3.7.1<br>Log Directory Writable: ?<br>WP Version: 6.4.3<br>WP Multisite: –<br>WP Memory Limit: 768 MB<br>WP Debug Mode: –<br>WP Cron: ?<br>Language: en_GB<br>External object cache: – Server Environment
    
    Server Info: Apache<br>PHP Version: 7.4.33<br>PHP Post Max Size: 256 MB<br>PHP Time Limit: 120<br>PHP Max Input Vars: 3000<br>cURL Version: 8.2.1<br>OpenSSL/3.1.1
    
    SUHOSIN Installed: –<br>MySQL Version: 5.7.44-48-log<br>Max Upload Size: 256 MB<br>Default Timezone is UTC: ?<br>fsockopen/cURL: ?<br>SoapClient: ?<br>DOMDocument: ?<br>GZip: ?<br>Multibyte String: ?<br>Remote Post: ?<br>Remote Get: ? Database
    
    WC Database Version: 8.5.2<br>WC Database Prefix: aik_<br>Total Database Size: 246.93MB<br>Database Data Size: 215.47MB<br>Database Index Size: 31.46MB<br>aik_woocommerce_sessions: Data: 1.02MB + Index: 0.02MB + Engine InnoDB<br>aik_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>aik_woocommerce_order_items: Data: 0.05MB + Index: 0.02MB + Engine InnoDB<br>aik_woocommerce_order_itemmeta: Data: 1.52MB + Index: 0.52MB + Engine InnoDB<br>aik_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>aik_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_actionscheduler_actions: Data: 1.52MB + Index: 0.50MB + Engine InnoDB<br>aik_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_actionscheduler_logs: Data: 0.50MB + Index: 0.23MB + Engine InnoDB<br>aik_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_comments: Data: 1.45MB + Index: 0.50MB + Engine InnoDB<br>aik_eum_logs: Data: 16.52MB + Index: 0.00MB + Engine InnoDB<br>aik_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_options: Data: 5.33MB + Index: 0.23MB + Engine InnoDB<br>aik_pmpro_discount_codes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>aik_pmpro_discount_codes_levels: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_pmpro_discount_codes_uses: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_pmpro_memberships_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_pmpro_memberships_pages: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_pmpro_memberships_users: Data: 0.02MB + Index: 0.09MB + Engine InnoDB<br>aik_pmpro_membership_levelmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_pmpro_membership_levels: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>aik_pmpro_membership_ordermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_pmpro_membership_orders: Data: 0.02MB + Index: 0.20MB + Engine InnoDB<br>aik_postmeta: Data: 7.52MB + Index: 5.55MB + Engine InnoDB<br>aik_posts: Data: 1.45MB + Index: 0.42MB + Engine InnoDB<br>aik_sgs_log_events: Data: 1.02MB + Index: 0.33MB + Engine InnoDB<br>aik_sgs_log_visitors: Data: 0.06MB + Index: 0.03MB + Engine InnoDB<br>aik_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_statistics_exclusions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_statistics_historical: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>aik_statistics_pages: Data: 0.34MB + Index: 0.86MB + Engine InnoDB<br>aik_statistics_search: Data: 0.09MB + Index: 0.11MB + Engine InnoDB<br>aik_statistics_useronline: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_statistics_visit: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_statistics_visitor: Data: 1.52MB + Index: 1.08MB + Engine InnoDB<br>aik_statistics_visitor_relationships: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_stock_log: Data: 0.05MB + Index: 0.00MB + Engine InnoDB<br>aik_termmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>aik_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_term_relationships: Data: 0.06MB + Index: 0.05MB + Engine InnoDB<br>aik_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_usermeta: Data: 2.52MB + Index: 1.97MB + Engine InnoDB<br>aik_users: Data: 0.08MB + Index: 0.05MB + Engine InnoDB<br>aik_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wcpdf_packing_slip_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wc_admin_notes: Data: 0.08MB + Index: 0.00MB + Engine InnoDB<br>aik_wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB<br>aik_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wc_customer_lookup: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>aik_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB<br>aik_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>aik_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_wc_order_product_lookup: Data: 0.05MB + Index: 0.06MB + Engine InnoDB<br>aik_wc_order_stats: Data: 0.05MB + Index: 0.05MB + Engine InnoDB<br>aik_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>aik_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_wc_product_meta_lookup: Data: 0.08MB + Index: 0.09MB + Engine InnoDB<br>aik_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_wfblockediplog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>aik_wfconfig: Data: 1.30MB + Index: 0.00MB + Engine InnoDB<br>aik_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wffilemods: Data: 14.55MB + Index: 0.00MB + Engine InnoDB<br>aik_wfhits: Data: 0.08MB + Index: 0.05MB + Engine InnoDB<br>aik_wfhoover: Data: 134.66MB + Index: 16.55MB + Engine InnoDB<br>aik_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>aik_wfknownfilelist: Data: 6.52MB + Index: 0.00MB + Engine InnoDB<br>aik_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wflogins: Data: 0.13MB + Index: 0.03MB + Engine InnoDB<br>aik_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>aik_wfls_role_counts: Data: 0.00MB + Index: 0.00MB + Engine MEMORY<br>aik_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wfnotifications: Data: 0.06MB + Index: 0.00MB + Engine InnoDB<br>aik_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>aik_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wfsecurityevents: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>aik_wfstatus: Data: 0.23MB + Index: 0.16MB + Engine InnoDB<br>aik_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wfwaffailures: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_woo_ua_auction_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>aik_wpml_mails: Data: 13.52MB + Index: 0.00MB + Engine InnoDB Post Type Counts
    
    attachment: 612<br>blocks: 2<br>custom_css: 2<br>elementor_library: 2<br>elementor-hf: 3<br>jetpack_migration: 2<br>jp_img_sitemap: 1<br>jp_sitemap: 1<br>jp_sitemap_master: 1<br>lty_lottery_ticket: 174<br>lty_lottery_winner: 2<br>mc4wp-form: 1<br>nav_menu_item: 82<br>oceanwp_library: 1<br>oembed_cache: 2<br>page: 41<br>post: 11<br>product: 289<br>product_variation: 142<br>revision: 1<br>shop_coupon: 3<br>shop_order: 714<br>shop_order_refund: 27<br>tribe_events: 24<br>tribe_venue: 1<br>tribe-ea-record: 1<br>wp_global_styles: 1<br>wpcf7_contact_form: 2<br>wpforms: 1 Security
    
    Secure connection (HTTPS): ?<br>Hide errors from visitors: ? Active Plugins (36)
    
    Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.1<br>Classic Editor: by WordPress Contributors – 1.6.3<br>Code Snippets: by Code Snippets Pro – 3.6.2<br>Contact Form 7: by Takayuki Miyoshi – 5.8.6<br>Cookie Notice & Compliance for GDPR / CCPA: by Hu-manity.co – 2.4.13<br>Display PHP Version: by David Gwyer – 1.8<br>Elementor: by Elementor.com – 3.19.0<br>Export User Data: by Q Studio – 2.2.6<br>Elementor Header & Footer Builder: by Brainstorm Force<br>Nikhil Chavan – 1.6.24
    
    Limit Orders for WooCommerce: by Nexcess – 2.0.0<br>MC4WP: Mailchimp for WordPress: by ibericode – 4.9.11<br>Nav Menu Roles: by Kathy Darling – 2.1.2<br>Ocean Custom Sidebar: by OceanWP – 1.1.2<br>Ocean Extra: by OceanWP – 2.2.4<br>Ocean Product Sharing: by OceanWP – 2.0.8<br>Ocean Social Sharing: by OceanWP – 2.0.6<br>Paid Memberships Pro: by Paid Memberships Pro – 2.12.8<br>Paid Memberships Pro - WooCommerce Add On: by Paid Memberships Pro – 1.8<br>reSmush.it Image Optimizer: by reSmush.it – 0.4.13<br>Speed Optimizer: by SiteGround – 7.4.6<br>Security Optimizer: by SiteGround – 1.4.10<br>WooCommerce - Show only lowest prices in variable products: by Fernando Tellado – 1.0.5<br>Easy Updates Manager: by Easy Updates Manager Team – 9.0.17<br>Under Construction: by WebFactory Ltd – 3.98<br>UpdraftPlus - Backup/Restore: by UpdraftPlus.Com<br>DavidAnderson – 1.23.16
    
    Product Customer List for WooCommerce: by Kokomo – 3.1.6<br>WooCommerce Stripe Gateway: by WooCommerce – 7.9.1<br>PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 3.7.7<br>WooCommerce Royal Mail: by WooCommerce – 2.7.0<br>Stock Manager for WooCommerce: by StoreApps – 3.0.0<br>WooCommerce: by Automattic – 8.5.2<br>WooSidebars: by WooCommerce – 1.4.6<br>Wordfence Security: by Wordfence – 7.11.1<br>WP Mail Logging: by WP Mail Logging Team – 1.12.0<br>WP-Optimize - Clean, Compress, Cache: by David Anderson<br>Ruhani Rabin<br>Team Updraft – 3.3.0
    
    WP Statistics: by VeronaLabs – 14.3.5 Inactive Plugins (1)
    
    Ultimate Auction For WooCommerce: by Nitesh Singh – 2.3.3 Dropin Plugins (1)
    
    advanced-cache.php: advanced-cache.php Settings
    
    API Enabled: –<br>Force SSL: –<br>Currency: GBP (£)<br>Currency Position: left<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: auction (auction)<br>external (external)<br>grouped (grouped)<br>lottery (lottery)<br>simple (simple)<br>variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)
    
    Connected to Woo.com: ?<br>Enforce Approved Product Download Directories: –<br>HPOS feature screen enabled: –<br>HPOS feature enabled: –<br>Order datastore: WC_Order_Data_Store_CPT<br>HPOS data sync enabled: – WC Pages
    
    Shop base: #13535 - /club-store/<br>Basket: #70 - /basket/<br>Checkout: #44 - /checkout/<br>My account: #11815 - /customer-account/<br>Terms and conditions: #6388 - /terms/ Theme
    
    Name: OceanWP<br>Version: 3.5.3<br>Author URL: https://oceanwp.org/about-oceanwp/<br>Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build<br>personally we recommend using a child theme. See: How to create a child theme
    
    WooCommerce Support: ? Templates
    
    Overrides: oceanwp/woocommerce/cart/mini-cart.php<br>oceanwp/woocommerce/content-single-product.php<br>oceanwp/woocommerce/loop/loop-start.php<br>oceanwp/woocommerce/single-product/product-image.php<br>oceanwp/woocommerce/single-product/title.php Admin
    
    Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>navigation<br>onboarding<br>onboarding-tasks<br>product-variation-management<br>product-virtual-downloadable<br>product-external-affiliate<br>product-grouped<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page
    
    Disabled Features: customize-store<br>minified-js<br>new-product-management-experience<br>product-linked<br>settings<br>async-product-editor-category-field
    
    Daily Cron: ? Next scheduled: 2024-02-05 15:51:25 +00:00<br>Options: ?<br>Notes: 131<br>Onboarding: completed Action Scheduler
    
    Complete: 198<br>Oldest: 2024-01-04 22:46:14 +0000<br>Newest: 2024-02-04 16:44:34 +0000
    
    Failed: 1,369<br>Oldest: 2023-02-14 20:35:45 +0000<br>Newest: 2023-06-01 12:29:56 +0100
    
    Pending: 2<br>Oldest: 2024-02-05 01:52:04 +0000<br>Newest: 2024-02-11 15:55:20 +0000 Limit Orders
    
    Enabled: ?<br>Limit: 50<br>Submitted orders: 4<br>Remaining orders: 46<br>Interval: daily<br>Interval start: 2024-02-04T00:00:00+00:00<br>Interval resets: 2024-02-05T00:00:00+00:00 Status report information
    
    Generated at: 2024-02-04 17:30:55 +00:00<br>`

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello updatediva,

    Thank you for contacting WooCommerce support.

    I understand that you are encountering discrepancies in order details within the ‘Orders’ section while the total amount appears to be correct and the item count and per/item prices do not match up.

    To assist you effectively and resolve this issue, I’d like to gather a bit more information:

    1. Has this issue occurred only once, or have you seen this happening on multiple orders?
    2. Have there been any recent updates to your site or changes made that coincide with when this issue began occurring?
    3. Could you provide more details about your invoicing generation software? Specifically, how it integrates with WooCommerce could offer clues as to where the discrepancy is arising.
    4. I noticed the presence of the Code Snippets plugin on your site. Are there any snippets of custom code that might be interacting with the Order storage or retrieval process within WooCommerce?

    Your answers to these questions will be pivotal in helping us to understand the nature of the problem. Once we have a clearer picture of the situation, we will be better equipped to pinpoint the issue and work towards an effective solution.

    Looking forward to your response. ??

    Best regards.

    Thread Starter updatediva

    (@updatediva)

    Thanks for your reply. Answers:

    Since November 2022 (71 qualifying orders total), there have been orders with errors like the above in Nov 2022 (1), March 2023 (1), August 2023 (1), September 2023 (1), November 2023 (1), December 2023 (1), January 2024 (7).

    We sell digital download and virtual products and they have no issues, ever.

    Both variable and single products have issues, and orders with a mix of both. The majority, however, process cleanly.

    We are using WooCommerce Royal Mail plugin, but some bad orders are ‘free pickup’. Many Royal Mail and Free Pickup are fine.

    Our invoice software is PDF Invoices & Packing Slips for Woocommerce.

    Do you think the problem could be WooCommerce going to blocks for checkout in December? I thought earlier installs were not effected by this update? We’ve been running since 2017. No other updates except that (which was forced, I believe).

    I’ve turned Code Snippets off and still have problems. My Snippets are for the copyright year, disable admin bar for shoppers, don’t show page name on product page, and ‘Hello, “Zubair”” in the login at the top of page.

    Thanks for your help.

    Hey, @updatediva! Thanks for the information.

    Can you find any similarities between the orders that had this issue? Such as same products purchased, same payment method or similar address?

    Can you please share
    Fatal error logs (if any) under WooCommerce > Status > Logs. Then you can use the selector to search for Fatal Errors.
    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    If you could also share screenshots of the order notes on a couple of those orders, that would be great too.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter updatediva

    (@updatediva)

    No fatal error logs.

    New order yesterday, that is now 15 items (should be 1) but correct totals and Royal Mail shipping calculations. https://imgur.com/a/1bnBynK

    It’s quickly getting worse and worse. As I stated above, digital downloads and virtual orders are fine (no shipping). There is no rhyme or reason, aside from it sometimes effecting popular products but sometimes not (we really only sell popular products, which are shirts that are variations). Simple products are sometimes effected, and sometimes not. It effects both domestic UK and international orders, sometimes. Most of the time they were fine.

    Is this because of the Woocommerce move to blocks for checkout? Our install is from about 2020 (with regular updates, and everything is up to date). Is WooCommerce Royal Mail conflicting? That plugin seems to be calculating postage correctly.

    What part of Woocommerce is running the order calculations? Because it know the total and is changing the item price and quantity to make it match. It is also only adjusting inventory by the correct quantity, not the weird quantity it’s calculating.

    Let me know if you’d like access.

    Hey, @updatediva! Thanks for the information.

    Is this because of the Woocommerce move to blocks for checkout? Our install is from about 2020 (with regular updates, and everything is up to date). Is WooCommerce Royal Mail conflicting? That plugin seems to be calculating postage correctly

    With the information we have now, it is not possible to confirm what is causing this yet.

    Can you please try a conflict test to check if another plugin is causing this issue?

    To test, you’ll first want to change the theme on your site to Storefront, then check to see if the issue is still present. If that resolves the issue, you’ll want to get in touch with your theme’s developer and see if they have an update or fix for you.

    If changing the theme doesn’t help, you’ll want to deactivate all plugins except for WooCommerce and take a look. If that fixes the problem, re-enable the other plugins one by one (gradually), checking after each, to see where the issue is coming from.

    — You can use test mode on the payment gateway to make test purchases and see if it triggers the issue.

    — Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality or you can consider using a service like Jetpack. If something goes wrong, you will be able to restore it.

    — Also, you can consider using a plugin like Health Check & Troubleshooting. This is a plugin developed by the WordPress community and it is helpful to disable plugins without affecting your current site visitors.

    — It is important to consider as well a staging functionality in case you would not like to touch your production site (you can ask your host if they offer this service), or you can use WP Staging for quickly spinning up a new test site.

    You can find more about this in this guide.

    Please let us know about your findings.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter updatediva

    (@updatediva)

    The following made no difference:

    • Switching to storefront theme
    • disabled all the plugins except WooCommerce, including the WooCommerce Royal Mail shipping plugin.
      • We know that orders that don’t have shipping (digital and virtual) are not effected by whatever is going on
    • The site health report is clean.

    Is my WooCommerce database corrupted? Is there a good cleaner plugin?

    Thread Starter updatediva

    (@updatediva)

    Hey, @carolm29, any thoughts? I had also asked which function is called for calculating line item totals in an order, so I can see why/how/??? it’s changing the order quantity and per item price to match the total.

    Hey, @updatediva!

    Thanks for the information.

    While database corruption is rare, it’s still a possibility. However, before jumping to conclusions, let’s try some other troubleshooting steps first.

    The function responsible for calculating these totals may vary depending on the specific circumstances of the order.

    Can you please share screenshots of the order notes of a couple of the orders that had this issue so can take a look?

    Here’s a screenshot of the order notes:

    You can remove any sensitive information from it.

    You also mentioned that you switched to the Checkout block in December, correct?

    Can you please try the short code checkout again and see if the issue persists?

    Also, just to confirm, you are being able to consistently replicate this issue, correct? But does it happen 100% of the time you add phisical products or only sometimes? Can you please share exactly how you are replicating it (which products do you add, etc) so we can try to replicate it on our end to check?

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter updatediva

    (@updatediva)

    Here are screen shots of our two most recent bad orders, 7th February (broken into part 1 and 2 of the screen shots to get all the information), with correct quantity and pricing written in:

    (1 item order, part 1) https://imgur.com/zRW6mPh

    (1 item order, part 2) https://imgur.com/ELNZPqa

    (2 items order, part 1) https://imgur.com/urFSs59

    (2 items order, part 2) https://imgur.com/z4Eu47m

    Glad to hear database corruption is rare.

    We *did not* switch to the new checkout block in December, but I understand it was added to WooCommerce core at that time. The note said it would only effect new installs, ie: after November 2023. The Woocommerce page is still [woocommerce_checkout].

    I *have not* been able to duplicate this error, which is the frustrating part. The best I have been able to do is to narrow it down to orders with items that have weight and dimensions in their Product description (so NOT digital downloads or virtual items). Both simple and variable products are having issues – sometimes.

    Also: I have uninstalled WooCommerce Royal Mail plugin, our shipping plugin, because I suspect it is the problem. We have purchased and installed another Royal Mail shipping plugin but haven’t had any orders since then (except two test orders which were fine).

    anastas10s

    (@anastas10s)

    ?? hey @updatediva

    Thank you for reaching back, with further details on this.

    Also: I have uninstalled WooCommerce Royal Mail plugin, our shipping plugin, because I suspect it is the problem. We have purchased and installed another Royal Mail shipping plugin but haven’t had any orders since then (except two test orders which were fine).

    Without being able to duplicate the issue with the previous set of plugins, hopefully it will stop occurring now, if the shipping plugin was the culprit.

    Moreover, I’m curious if you could share the invoice for these two recent bad orders, in order to be able to see how the amounts are different there, when comparing to the WooCommerce back-end.

    By the way, after stumbling upon this thread, I’m just curious if you had a chance to reach out to the PDF Invoices plugin with regard to this issue, or otherwise?

    Cheers!

    Thread Starter updatediva

    (@updatediva)

    Thanks for your reply. Here’s the redacted PDF invoices for the two most recent bad orders: https://imgur.com/a/LI6DPmX

    For this thread: https://www.ads-software.com/support/topic/odd-meta-data-suddenly-showing-up-in-invoice-pdf/ I just added the PHP. Again, this was only happening on order with weight/dimensions, not digital/virtual orders, with the shipping plugin WooCommerce Royal Mail.

    I will reach out to the invoice plugin, PDF Invoices & Packing Slips for WooCommerce (up to date version) but it’s my understanding that their software does not interface with the WooCommerce order display and calculation functions. It calls the values and formats them for print.

    It would help me debug if I knew the functions called by WooCommerce to calculate the line item order quantity, item cost, and total item cost (quantity x cost). The fact that WooCommerce is taking ‘total item cost’ and backward calculating a fictitious quantity x cost is really confusing me. This must be a display function, because the rest of the calculations based on this info is correct, and inventory is being reduced correctly.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @updatediva,

    From your explanation, it seems like there might be a conflict between your WooCommerce Royal Mail shipping plugin and the PDF Invoices & Packing Slips for WooCommerce plugin regarding orders with weight/dimensions.

    WooCommerce uses various functions to calculate the line item order quantity, item cost, and total item cost. The get_quantity() function is used to get the quantity of the item, get_total() to get the total cost, and get_subtotal() to get the total item cost.

    However, the backward calculation you’re seeing might be due to a display function or a filter that’s modifying the output. If the calculations are correct and inventory is being reduced correctly, the issue may be related to how these values are displayed on the invoice.

    I recommend reaching out to the developers of the PDF Invoices & Packing Slips for WooCommerce plugin, as they might have more insights into how their plugin interfaces with WooCommerce’s functions and displays the data.

    I hope this provides some clarity. Please let us know if you have any other questions!

    Thread Starter updatediva

    (@updatediva)

    I agree. Thank you for working through this with me. My number one concern was that the database was corrupt, and I’m glad that doesn’t seem to be the case. I will go forward chasing down the invoicing plugin as it relates to the shipping calculation function.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Order details wrong but order totals correct’ is closed to new replies.