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

GooglePay and ApplePay buttons disappear from the minicart when adding a product to the cart on the shop page (PCP-2472) #1915

Conversation

pedrosilva-pt
Copy link
Contributor

PR Description

This PR handles rerendering of ApplePay and GooglePay buttons on wc_fragments_loaded wc_fragments_refreshed event.

Issue Description

When adding a product to the Minicart on the shop page the GooglePay and ApplePay buttons disappear.

Before adding to cart:
image

After adding to cart:
image

Steps To Reproduce

  • Enable GooglePay and ApplePay.
  • Have the Storefront theme active.
  • Go to the shop page.
  • See the GooglePay and ApplePay (when applicable) buttons on the minicart.
  • Add a product to cart.
  • See the GooglePay and ApplePay buttons missing on the minicart.

Expected behaviour

After adding a product to cart on the shop page the minicart still has the GooglePay and ApplePay buttons visible.

Possible cause

This is probably due to the minicart dom element being rerendered and but the GooglePay and ApplePay buttons not handling this event.

Suggested solution

GooglePay and ApplePay buttons should handle the Minicart rerendering event.

@pedrosilva-pt pedrosilva-pt changed the title GooglePay and ApplePay buttons disappear when adding a product to the cart on the shop page (PCP-2472) GooglePay and ApplePay buttons disappear from the minicart when adding a product to the cart on the shop page (PCP-2472) Dec 18, 2023
@InpsydeNiklas InpsydeNiklas added this to the 2.5.0 milestone Dec 18, 2023
@Dinamiko Dinamiko merged commit e465bfb into trunk Jan 5, 2024
14 checks passed
@Dinamiko Dinamiko deleted the PCP-2472-google-pay-and-apple-pay-buttons-disappear-when-adding-a-product-to-the-cart-on-the-shop-page branch January 5, 2024 11:08
@Dinamiko Dinamiko added the bug Something isn't working label Jan 12, 2024
@Dinamiko Dinamiko mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants