Title: owner232's Replies | WordPress.org

---

# owner232

  [  ](https://wordpress.org/support/users/owner232/)

 *   [Profile](https://wordpress.org/support/users/owner232/)
 *   [Topics Started](https://wordpress.org/support/users/owner232/topics/)
 *   [Replies Created](https://wordpress.org/support/users/owner232/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/owner232/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/owner232/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/owner232/engagements/)
 *   [Favorites](https://wordpress.org/support/users/owner232/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Payment Gateway Based Fees and Discounts for WooCommerce] Bug: Payment method radio button values all changed to selected method’s value](https://wordpress.org/support/topic/bug-payment-method-radio-button-values-all-changed-to-selected-methods-value/)
 *  [owner232](https://wordpress.org/support/users/owner232/)
 * (@owner232)
 * [1 week, 6 days ago](https://wordpress.org/support/topic/bug-payment-method-radio-button-values-all-changed-to-selected-methods-value/#post-18976117)
 * Hi [@komal-maru](https://wordpress.org/support/users/komal-maru/),
 * I can confirm this bug and add a CheckoutWC-specific reproduction from the released
   plugin.
 * Environment:
    - Payment Gateway Based Fees and Discounts for WooCommerce 3.2.0
    - CheckoutWC 11.3.0
    - WooCommerce 10.9.4
    - WordPress 7.0.2
    - Android Chrome/mobile viewport
    - Hosted iframe card gateway
 * CheckoutWC impact:
    1. On a fresh mobile checkout, selecting the embedded Credit Card gateway can leave
       all three visible card containers blank because the secure iframes are removed
       during the extra checkout refresh.
    2. After the failure, switching to other gateways and clicking Place Order/Complete
       Order may do nothing until the page is refreshed.
    3. Gateway-based 10% discounts can also stop updating because all payment radios
       have been overwritten with the same value.
 * The original handler has two separate problems:
    - .val(methodSelected) mutates every payment_method radio value.
    - trigger(‘change’) on the collection dispatches repeated change/update cycles.
      In CheckoutWC, those updates replace the payment-method DOM while hosted fields
      are mounting.
 * Important fix detail: changing the last line only to:
 * $(‘input[name=”payment_method”]:checked’).trigger(‘change’);
 * prevented sibling value corruption, but it was still insufficient with CheckoutWC
   because it caused a redundant update cycle and the hosted fields could still 
   be torn down. Removing the entire payment_method_selected handler was required
   in our test. The existing change/update logic continued to apply and remove gateway
   discounts correctly without that handler.
 * Verification after removing the handler and cache-busting the asset:
    - every payment radio retained its original gateway ID;
    - all three secure card iframes mounted on the first mobile load;
    - alternate gateways remained selectable and Place Order worked normally;
    - the alternative payment method discounts displayed again;
    - no card data or live order was submitted during testing.
 * Please ensure the ZIP/final release does not merely retarget the same trigger
   to :checked, and add a CheckoutWC regression test confirming that selecting a
   gateway neither mutates sibling radio values nor causes a second payment DOM 
   refresh.
 * Thank you.

Viewing 1 replies (of 1 total)