• I noticed an issue with the cart link not disappearing in my site’s navigation after completing an order and landing on the Order Confirmation Page. This was noticed this after updating to 2.6.1, where I thought maybe the bug was introduced in this latest update, so I reverted back to 2.6.0 and got the same issue.

    From what I can tell, the only time the cart doesn’t disappear like it should once reaching the confirmation page is when I am checking out with a $0 balance. We’re selling a service for free, so the product shows $0 in the cart and checkout page. Additionally, when I reach the checkout page, there is no area to fill out any sort of billing information (credit cards, direct deposit, etc), which makes sense considering users don’t need to submit any funds.

    To test further, I adjusted the price of the $0 service to $1, where the checkout page provides the area to enter CC info. I enter all required personal and billing details, reach the confirmation page, and the cart link hides like it should. I also tested a transaction, combining the $0 service with a different product (priced more than $0), and again the cart link hides as it should on the confirmation page.

    My WordPress debug log is throwing no errors. I’m using WooCommerce v3.2.6 and WooCommerce Menu Cart v2.6.1.

    Thanks for any help you can offer!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi!
    I’ve tried to backtrace this, and it looks like this is actually a WooCommerce bug. To determine whether or not the $0 cart should be shown, this plugin uses two data sources:

    • The actual cart data. The WooCommerce cart object has a method get_cart_contents_count() which will call to see if this returns 0 (and if so, and you have set the empty cart to hide, hide it).
    • In case you are using server side caching, there is a fallback to browser cookies (woocommerce_items_in_cart). Same check as above

    It looks like WooCommerce does not properly reset either (or both) of those values after checking out a free product.

    Unfortunately this is out of scope for this plugin, as we have to work with the data that WooCommerce provides. You can file a bug report here: https://github.com/woocommerce/woocommerce/issues

    I’m sorry I don’t have a solution for you yet but hope this helps!

    Ewout

    Thread Starter bknightly

    (@bknightly)

    Thanks for your reply, Ewout! This really helps narrow things down.

    I’ll be sure to submit an issue to WooCommerce’s github page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cart Not Hiding After Order If Buying $0 Item’ is closed to new replies.