Skip to content

Known bug: Issue with WooCommerce v10 compatibility with the cart session when cart is empty. #533

@seb86

Description

@seb86

Describe the bug

When deleting the only item in the cart, the response now returns undefined array key on specific cart session data due to a change made in WooCommerce v10 that now clears the cart session directly rather than just clearing the cart.

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest trunk branch of CoCart on GitHub.
  • The issue still exists against the latest development branch of CoCart on GitHub (this is not the same version as on WordPress.org!).
  • I have attempted to find the simplest possible steps to reproduce the issue.

Steps to reproduce the issue

  1. Add item to cart
  2. Get cart
  3. Remove item from cart

Expected/actual behavior

When I follow those steps, I see the errors returned at the top of the cart response.

I was expecting to see just the cart response.

Screenshots

Image

Isolating the problem

  • This bug happens with only WooCommerce and CoCart plugin are active.
  • This bug happens with a default WordPress theme active.
  • This bug happens with the WordPress theme Storefront active.
  • This bug happens with the latest release of WooCommerce active.
  • This bug happens only when I authenticate as a customer.
  • This bug happens only when I authenticate as administrator.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

Details ``` Go to "WooCommerce > System Status then copy and paste the system status report here. ```

Additional context

This bug was first reported in the CoCart Discord Community. https://discord.com/channels/862091299049177148/1395899954316447744

Unclear yet if this change in WooCommerce affects being able to restore items to the cart.

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus: woocommerceIssues related to the core of WooCommerce that affect CoCart.status:changelog addedMark all PRs that have their changelog entries added to CHANGELOG.md

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions