Skip to content

When opening a variable product page, a WooCommerce error message about adding to the cart is displayed. #4321

@Pawel-H-OTGS

Description

@Pawel-H-OTGS

Describe the Bug

WooCommerce PayPal Payments 4.0.3 displays an error when opening a variable product page, which in previous versions was still being generated in the code but was hidden as a WooCommerce notice (not shown to the user).

To Reproduce

  • Plugins:
    • WooCommerce 10.7.0
    • WooPayments 10.7.1
    • WooCommerce PayPal Payments 4.0.3
  • Enable the PayPal payment gateway.
  • Create a variable product with at least two options
  • Open the product page on the frontend - an error will appear

Screenshots

Image

It is triggered in every version of WooCommerce PayPal Payments 4.0.x that I tested.

Image

It triggers execution of the code that produces this exception (which is later converted into a WooCommerce notice).

Image

Expected Behavior

  • Not generating the notice or hiding it.

Actual Behavior

  • The notice is generated, but in previous versions it was being hidden.

Environment

Plugins:

  • WooCommerce 10.7.0
  • WooPayments 10.7.1
  • WooCommerce PayPal Payments 4.0.3

Additional Details

I can see that between 4.0.2 and 4.0.3 you modified something in the notification hiding system - it’s likely that this is why it stopped working for this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions