Skip to content

Checkout: "Sorry, your session has expired." if product is added to empty cart on checkout page #551

Description

@bogdanfix

What I expected

I expected that item will be just added to cart and checkout page will work as usual.

What happened instead

Instead the checkout page has loaded up and all the checkout fields were removed and the message "Sorry, your session has expired. Return to shop" was shown instead.

2018-02-20 16 55 09

Steps to reproduce the issue

Make sure you have this plugin 4.0+ and latest WooCommerce. Open the incognito window and go to http://your-test-store.com/checkout/?add-to-cart=1234

It happens only if "Payment Request Buttons" option is enabled in the gateway settings.

The same happens if you have the code, that adds the item to the cart via Plugin API, when the checkout page is visited. Using WC()->cart->add_to_cart().


  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Metadata

Metadata

Assignees

Labels

priority: highThe issue/PR is high priority—it affects lots of customers substantially, but not critically.type: bugThe issue is a confirmed bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions