You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem
When changing the shipping method on the cart page, the PayPal button disappears until a site refresh or AJAX reload.
Any AJAX reload in the cart page will lead to the Pay Latter banner disappearing until the site was refreshed.
Steps to reproduce
set up a webshop with at least 2 shipping methods and at least 1 product
set up PayPal Payments as a payment method & enable button on the cart page
add a product to the cart and visit the cart page
change shipping in the cart from one to the other option --> paypal button disappears until site reload
change the item total and hit “update cart” to make the Pay Later messaging disappear
Expected behaviour
When changing the shipping method, the button should stay hooked.
Also, any AJAX update on the site should cause the Lay Later messaging to be updated.
Possible cause
interestingly, applying the button to a different hook may cause it to not disappear upon changing shipping methods:
hook the cart page buttons after the cart to prevent it from disappearing upon changing shipping options (might require additional CSS for placement)
The button seemingly only disappears when hooked into woocommerce_proceed_to_checkout or woocommerce_after_cart_totals or some others, but woocommerce_after_cart causes the button to not disappear.
Workaround
interestingly, applying the button to a different hook may cause it to not disappear upon changing shipping methods:
hook the cart page buttons after the cart to prevent it from disappearing upon changing shipping options (might require additional CSS for placement)
The button seemingly only disappears when hooked into woocommerce_proceed_to_checkout or woocommerce_after_cart_totals or some others, but woocommerce_after_cart causes the button to not disappear.
The text was updated successfully, but these errors were encountered:
isabellainpsyde
changed the title
Smart button & Pay Later messaging disappear on the cart page after changing shipping method
Smart button & Pay Later messaging disappear on the cart page after changing shipping method (163)
Oct 7, 2021
The problem
When changing the shipping method on the cart page, the PayPal button disappears until a site refresh or AJAX reload.
Any AJAX reload in the cart page will lead to the Pay Latter banner disappearing until the site was refreshed.
Steps to reproduce
Expected behaviour
When changing the shipping method, the button should stay hooked.
Also, any AJAX update on the site should cause the Lay Later messaging to be updated.
Possible cause
interestingly, applying the button to a different hook may cause it to not disappear upon changing shipping methods:
hook the cart page buttons after the cart to prevent it from disappearing upon changing shipping options (might require additional CSS for placement)
The button seemingly only disappears when hooked into woocommerce_proceed_to_checkout or woocommerce_after_cart_totals or some others, but woocommerce_after_cart causes the button to not disappear.
Workaround
interestingly, applying the button to a different hook may cause it to not disappear upon changing shipping methods:
hook the cart page buttons after the cart to prevent it from disappearing upon changing shipping options (might require additional CSS for placement)
The button seemingly only disappears when hooked into woocommerce_proceed_to_checkout or woocommerce_after_cart_totals or some others, but woocommerce_after_cart causes the button to not disappear.
The text was updated successfully, but these errors were encountered: