Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for cart-add-item hook in WC 8.5 #2192

Closed
wants to merge 1 commit into from

Conversation

puntope
Copy link
Contributor

@puntope puntope commented Jan 1, 2024

Changes proposed in this Pull Request:

Closes #2191.

This PR closes a bug in GLA when using WC8.5 and Product Blocks. In WC 8.5 we receive a Proxy Product as a parameter. Before we got 2, product and quantity

Detailed test instructions:

  1. Install WC < 8.5
  2. Setup a block shop page
  3. Use GA Debugger extension to check the GA events.
  4. Add an item to the cart and verify the add to cart event is triggered without errors
  5. Install WC >= 8.5
  6. Add an item to the cart and verify the add to cart event is triggered without errors

Additional details:

Changelog entry

Fix - Add to cart produces an error

@github-actions github-actions bot added changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug. labels Jan 1, 2024
@puntope puntope self-assigned this Jan 1, 2024
@puntope puntope marked this pull request as ready for review January 1, 2024 20:31
@puntope puntope requested a review from a team January 1, 2024 20:31
Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work. I can reproduce the issue with Woo 8.5.0-beta.1 and the Products (Beta) block.

image

I believe it was caused by woocommerce/woocommerce#42946 and has been reverted by woocommerce/woocommerce#43177. After testing with Woo 8.5.0-rc.1, the issue no longer occurs. Therefore, this PR should not need to be merged.

Ref: pf59Ax-wM-p2

@puntope
Copy link
Contributor Author

puntope commented Jan 3, 2024

Correct @eason9487 It was confirmed as well by woo-blocks team.

@puntope puntope closed this Jan 3, 2024
@eason9487 eason9487 deleted the fix/cart-add-item-hook branch January 4, 2024 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WC 8.5] Add to cart produces an error
2 participants