• Resolved megalice

    (@megalice)


    Hi. I’ve I originally posted this on the WooCommerce Stripe Payment Gateway support page here:
    https://wordpress.org/support/topic/issue-switching-between-payment-methods-at-checkout/
    I was then recommended to post on this forum by @frankremmy who suggested this is a Woocommerce core issue. I hope you can help here.

    My issue:
    On my checkout page, https://www.maggiedent.com/checkout/, when I switch to the WooCommerce Stripe Payment Gateway plugin’s card payment option and back to my Paypal plugin’s payment option, Paypal does not load and the checkout button does not display ‘Proceed to Paypal’ as it should. It is stuck on the card payment option. There must be some sort of script error. However, when I load the checkout with the Chrome Inspector window open the payment method selection behaves correctly. This makes it difficult to trace. I’ve spent several hours troubleshooting this. Disabled all non-essential plugins, switched themes, cleared caches. All the usual steps.

    Some further detail: I tried a 3rd-party Stripe plugin (not the Woo one mentioned above) and this fixed the issue when switching payment methods at checkout. i.e. when user switches to Paypal the submit button changes to ‘Proceed to Paypal’ and they can proceed. However if a user selects the card payment option for the Woo Stripe plugin (WooCommerce Stripe Payment Gateway) it seems to get stuck on that option and not allow switching back to Paypal (even though it shows it is selected). I have many subscriptions using this gateway so I cannot switch to anther Stripe gateway plugin. I just need this one to work!

    Screenshot 2025-09-10 112515.jpg55.8 kB

    Above shows incorrect behaviour as it hasn’t properly switched to Paypal even though it shows it is selected.

    Screenshot 2025-09-10 112555.jpg43.5 kB

    Above shows correct behaviour however only works when the Chrome Inspector is open…which must have some effect on the scripts running.

    WooCommerce System report: https://pastebin.com/HFC5Jhnr

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @megalice

    I understand how disruptive this is — payment selection that looks like it changed but still blocks customers from completing checkout is exactly the kind of issue that can cost sales and cause real stress. I’ll help walk through focused checks that often catch the JavaScript race/interaction problems you’re seeing (especially since the behaviour changing when Chrome Inspector is open points strongly at a timing or script-conflict issue).

    When did this start happening? Did it appear after any plugin, Stripe gateway, Flatsome (parent or child) or PHP update, or was everything working correctly before a specific date or change?

    Below I’ve laid out a clear troubleshooting plan you can run (or hand to a dev) and an explicit theme/plugin conflict test — based on your details, the theme is a likely culprit so start there.

    First quick checks to run now on a staging copy (so live store is unaffected)

    Enable WordPress debug logging by adding to wp-config.php:
    define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true);

    Then reproduce the issue and check wp-content/debug.log for PHP errors. Also open your browser console (F12 → Console) while reproducing the switch and copy any JavaScript errors or warnings you see. Save timestamps and screenshots of the console and the checkout state.

    Minimal reproducible environment
    Create a staging copy (or use a safe local environment). Activate only these: WooCommerce, WooCommerce Stripe Gateway (your version), WooCommerce PayPal Payments, and a default theme such as Storefront or Twenty Twenty-Three. Leave everything else disabled. Reproduce the payment-switch behaviour. If the issue disappears, it’s a conflict with another plugin or your Flatsome child theme. If it persists, it’s likely within the Stripe gateway or core interaction.

    Theme conflict test
    Switch to a default/theme (Storefront or Twenty Twenty-Three) and test again. If switching fixes it, switch back to Flatsome child and then temporarily switch to the Flatsome parent (if child overrides checkout templates) — the child theme has several template overrides in your system report, any of which could interfere with payment JavaScript. Also check for outdated template overrides in the child theme and update or remove them for testing.

    Plugin conflict test
    With the default theme active, reactivate other plugins one-by-one (or in small groups) until the issue reappears. Pay special attention to caching, optimization, or script-manipulating plugins and any plugin that affects checkout or payment scripts (e.g. custom optimizations, WP Engine cache, live cart, or any plugin that minifies/combines JS). Note which plugin activation causes the regression.

    Caching / optimization checks
    Temporarily disable any server-side caching, page caching, JS minification/combining or critical CSS that could change script timing. Since the issue behaves differently when DevTools is open, this strongly suggests a race/timing issue that caching/minification can expose.

    Collect reproducible evidence
    If the issue reproduces in a minimal setup include: steps to reproduce, the console errors (copy/paste), a screen recording showing the problem, and whether it only fails in one browser or multiple. Also include whether the Stripe plugin is in test or live mode and any Stripe/PayPal logs if available.

    Investigate Stripe gateway settings
    Check WooCommerce Stripe Gateway settings for any options around optimized checkout, deferred scripts, or express checkout. In your system report I see Optimized Checkout is set to No, but confirm other script-related options and try toggling them in staging while testing.

    Check for outdated WooCommerce template overrides
    Your status report shows several child-theme WooCommerce template overrides and some out-of-date files. Outdated overrides touching the checkout/form or buttons can cause unexpected behaviour. Temporarily remove or rename the child theme checkout overrides and retest.

    If it still fails in minimal setup
    If the issue persists after the minimal environment and theme/plugin conflict tests, collect the evidence above and open a support request with the Stripe Gateway team including the environment details, the console log, a short screen recording, and the exact steps you used. If it only fails with the Woo Stripe plugin enabled and not with a third-party Stripe plugin, that’s an important reproduction detail for them.

    What I need from you next
    Tell me when the issue started and whether it followed any updates. If you can run the theme/plugin conflict test in staging, please tell me the result and paste any console errors you find (or upload the debug.log lines and a short recording).

    Let’s see how it goes!

    Plugin Support thelmachido a11n

    (@thelmachido)

    It’s been a while since we heard back from you for this reason we are closing this thread. 

    If WooCommerce has been useful for your store and you appreciate the support you’ve received, we’d truly appreciate it if you could leave us a quick reviewhere: 

     https://wordpress.org/support/plugin/woocommerce/reviews/#new-post 

    Feel free to open a new forum topic if you run into any other problem. 

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Issue switching between payment methods at checkout’ is closed to new replies.