Place Order button flickers when selecting PayPlus payment method at checkout
-
Hi,
After updating to v8.1.8, we’ve noticed a visible issue during checkout.
When a customer selects the PayPlus payment method, the “Place Order” button briefly appears, disappears, and then reappears. The flicker lasts about a second and is noticeable every time the payment method is selected.
After investigating, I traced the behavior to a change introduced in
assets/js/checkout.js. The payment method change handler now triggers a full checkout refresh whenever the selected payment method changes:if (selectedPaymentMethod !== wc_checkout_form.selectedPaymentMethod) { $(document.body).trigger("payment_method_selected"); $(document.body).trigger("update_checkout", { update_shipping_method: false }); }The newly added
update_checkouttrigger causes WooCommerce to perform its AJAX order review refresh, which temporarily blocks and re-renders the#place_orderbutton. As a result, users see the button appear → disappear → reappear.By default, WooCommerce does not trigger
update_checkoutsimply when switching payment methods, which is why this behavior was not present in previous versions.I also noticed that another change in the same file replaced:
.prop("checked", true)with:
.trigger("click")This now invokes the payment method change handler directly, making the issue consistently reproducible.
Would it be possible to either:
- Remove the
update_checkouttrigger entirely, or - Limit/debounce it so it only runs when the selected payment method actually affects order totals or checkout calculations?
The issue was not present in earlier versions and appears to have been introduced by these changes.
Environment:
- PayPlus for WooCommerce: v8.1.8
- WooCommerce: latest
- WordPress: latest
Thank you for looking into this.
- Remove the
You must be logged in to reply to this topic.