Hi @hade,
I apologize for the delay in getting back to you.
My developer colleague has checked your concern and he has provided a zip file with the fix for the reported issue via the Dropbox link below:
Dropbox link: https://www.dropbox.com/scl/fi/77txftik9rdyg89buew9v/checkout-fees-for-woocommerce-2.zip?rlkey=jf9z2a6rlk1vy6bs0k3f4n257&st=d3brxgo7&dl=0
After downloading the file, you can upload it from Plugins → Add New Plugin → Upload Plugin and replace the existing plugin file.
Once the upload is completed, please test the reported issue and let me know the result.
Note: We recommend applying the patch and testing it on your staging site first. Once you have confirmed that everything is working as expected, you can apply the same changes to your live site.
Hi @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:
- 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.
- After the failure, switching to other gateways and clicking Place Order/Complete Order may do nothing until the page is refreshed.
- 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.
Hi @owner232,
My developer colleague has checked your reply, and he has provided a zip file with the fix for the reported issue via the Dropbox link below:
Dropbox link: https://www.dropbox.com/scl/fi/7yffmzno12dw5w20o9mov/checkout-fees-for-woocommerce-3.zip?rlkey=0riyhx1q2t0h881im3vw0ctst&st=bh8gv8g3&dl=0
After downloading the file, you can upload it from Plugins → Add New Plugin → Upload Plugin and replace the existing plugin file.
Once the replacement is complete, kindly test the reported issue and let us know the outcome. If the patch resolves the issue on your end, we’ll proceed with including the fix in the core plugin so that it is available in a future plugin release.
Note: We recommend applying the patch and testing it on your staging site first. Once you have confirmed that everything is working as expected, you can apply the same changes to your live site.