Title: Checkout Loop
Last modified: July 28, 2026

---

# Checkout Loop

 *  Resolved [DevanToast](https://wordpress.org/support/users/devancadman/)
 * (@devancadman)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/checkout-loop/)
 * Hi Support,
 * Since the latest update of the Payment Plugins for Stripe WooCommerce plugin,
   the checkout payment options are no longer loading correctly.
 * When Stripe payment methods are enabled, the checkout gets stuck in a loading
   loop and the following JavaScript errors appear in the browser console:
 *     ```wp-block-code
       credit-card.js:
       Uncaught TypeError: Cannot read properties of null (reading 'cardFormType')
   
       gateways.js:
       Uncaught TypeError: Cannot read properties of null (reading 'button_placement')
   
       applepay-checkout.js:
       Uncaught TypeError: Cannot read properties of null (reading 'button_placement')
   
       googlepay-checkout.js:
       Uncaught TypeError: Cannot read properties of null (reading 'button_placement')
   
       local-payment-checkout.js:
       Uncaught TypeError: Cannot convert undefined or null to object
       at Object.entries
       ```
   
 * The issue occurs with multiple Stripe payment methods, including:
    - Credit/Debit Cards
    - Apple Pay
    - Google Pay
    - Klarna
    - Local Payment Methods
 * If all Stripe payment methods are disabled, PayPal continues to work correctly,
   so the issue appears to be isolated to the Stripe plugin.
 * Could you please investigate whether this is a known issue with the latest version(
   4.0.8)?
   **Plugin version**: Version 4.0.8 |**WooCommerce: **Version 10.9.4**WordPress:**
   Version 7.0.2
 * Thanks.
    -  This topic was modified 1 week, 5 days ago by [DevanToast](https://wordpress.org/support/users/devancadman/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcheckout-loop%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18977316)
 * Hi [@devancadman](https://wordpress.org/support/users/devancadman/)
 * > Could you please investigate whether this is a known issue with the latest 
   > version (4.0.8)?
 * It is not a known issue. Please provide a site url where this can be replicated.
   Stripe is not active on the site url you shared.
 * It appears required JS variables are not loading on your page. Are you using 
   a cache?
 * Thanks
 *  Thread Starter [DevanToast](https://wordpress.org/support/users/devancadman/)
 * (@devancadman)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18977364)
 * Hey Clayton,
   I have now re-enabled the payment methods on the site.Not using 
   any caching plugin. Server cache is set to not cache the Basket and Checkout 
   pages.Thanks,Devan
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18977369)
 * Hi [@devancadman](https://wordpress.org/support/users/devancadman/)
 * You can disable it now, your site has been tested. The plugin now relies on a
   single JS variable called `wcStripeSettings` and that’s not defined on your checkout
   page.
 * That variable uses the core WordPress action `wp_print_footer_scripts` which 
   doesn’t appear to be triggered on your site. Can you confirm why `wp_print_footer_scripts`
   would not be triggered?
 * Kind Regards
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18977425)
 * Hi [@devancadman](https://wordpress.org/support/users/devancadman/)
 * What doesn’t make sense is the PayPal plugin uses the same action, `wp_print_footer_scripts`
   to output the `wcPPCPSettings` variable. That action seems to be triggered so
   it seems impossible that the `wcStripeSettings` variable would not exist.
 * The only thing I can think of is your cart and checkout page is being cached.
   The `wcStripeSettings` variable is not on your cart page as well but `wcPPCPSettings`
   is.
 * Kind Regards
 *  Thread Starter [DevanToast](https://wordpress.org/support/users/devancadman/)
 * (@devancadman)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18977480)
 * Hey Clayton,
 * I have completed some further debugging.
 * The Stripe scripts are all registered correctly. The following handles are present:
 *     ```wp-block-code
       wc-stripe-gateways
       wc-stripe-credit-card
       wc-stripe-applepay-checkout
       wc-stripe-googlepay-checkout
       wc-stripe-local-payment-checkout
       ```
   
 * However, none of the Stripe handles have any inline scripts attached.
 * There is no output similar to:
 *     ```wp-block-code
       var wcStripeSettings = {...};
       ```
   
 * The WordPress hooks are definitely firing:
    - `wp_footer`
    - `wp_print_footer_scripts`
 * WooCommerce also detects the Stripe gateways correctly:
 *     ```wp-block-code
       ppcp, stripe_cc, stripe_applepay, stripe_googlepay, stripe_klarna
       ```
   
 * Could you confirm which script handle `wcStripeSettings` should be attached to,
   and which PHP class/function is responsible for registering it?
 * At this point it looks like the plugin is enqueueing the JS assets but not registering
   the configuration data.
 * Thanks.
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18977482)
 * Hi [@devancadman](https://wordpress.org/support/users/devancadman/)
 * > At this point it looks like the plugin is enqueueing the JS assets but not 
   > registering the configuration data.
 * That is not correct, the plugin uses the exact same design as the PayPal plugin.
   It doesn’t use an enqueued script, it prints the variable to the page.
 * Can you check that your checkout page isn’t being cached?
 * Thank You
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 5 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18977557)
 * Hi [@devancadman](https://wordpress.org/support/users/devancadman/)
 * Here is a link to the code where the `wcStripeSettings` variable is output to
   the page:
 * The action is registered: [https://plugins.trac.wordpress.org/browser/woo-stripe-payment/tags/4.0.8/src/Assets/AssetDataController.php#L58](https://plugins.trac.wordpress.org/browser/woo-stripe-payment/tags/4.0.8/src/Assets/AssetDataController.php#L58)
 * The data is output to the page: [https://plugins.trac.wordpress.org/browser/woo-stripe-payment/tags/4.0.8/src/Assets/AssetDataController.php#L89](https://plugins.trac.wordpress.org/browser/woo-stripe-payment/tags/4.0.8/src/Assets/AssetDataController.php#L89)
 * Maybe you can add some logging to confirm this code is being called.
 * Here is the PayPal plugin code that is identical to the Stripe plugin: [https://plugins.trac.wordpress.org/browser/pymntpl-paypal-woocommerce/tags/2.0.23/src/Assets/AssetDataController.php](https://plugins.trac.wordpress.org/browser/pymntpl-paypal-woocommerce/tags/2.0.23/src/Assets/AssetDataController.php)
 * Kind Regards
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18978523)
 * Hi [@devancadman](https://wordpress.org/support/users/devancadman/)
 * Following up on this request.
 * Kind Regards
 *  Thread Starter [DevanToast](https://wordpress.org/support/users/devancadman/)
 * (@devancadman)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18980325)
 * Hi Clayton,
 * I have added logging around the `enqueue_asset_data()` method and can confirm
   that `wp_print_footer_scripts` is firing correctly.
 * The logs show:
    - Stripe: enqueue_asset_data() called
    - Stripe: has_data BEFORE action = YES
    - Stripe: has_data AFTER action = YES
    - Stripe: Printing wcStripeSettings
 * However, the browser error remains:
 *     ```wp-block-code
       credit-card.js:Uncaught TypeError: Cannot read properties of null (reading 'cardFormType')
       ```
   
 * While debugging in the browser I found something unexpected.
 * `window.wcStripeSettings` is **undefined**:
 *     ```wp-block-code
       console.log(window.wcStripeSettings);// undefined
       ```
   
 * However, the same data is available under:
 *     ```wp-block-code
       console.log(window.wcCardSettings);
       ```
   
 * which returns the full settings object, including `stripe_cc_data`.
 * The plugin logs indicate that `print_data( 'wcStripeSettings', ... )` is being
   called, but the rendered page ends up creating `window.wcCardSettings` instead
   of `window.wcStripeSettings`.
 * Since `credit-card.js` calls:
 *     ```wp-block-code
       getSetting("stripe_cc_data")
       ```
   
 * and `getSetting()` reads from:
 *     ```wp-block-code
       window.wcStripeSettings
       ```
   
 * it seems the script is looking for a global that doesn’t exist, even though the
   data itself has been generated.
 * The site is hosted on WP Engine. They have confirmed that the basket and checkout
   pages are not cached, and there are no caching plugins installed.
 * Does anything within the plugin intentionally rename `wcStripeSettings` to `wcCardSettings`,
   or is there another component that aliases or rewrites the settings object before`
   credit-card.js` executes?
 * Thanks.
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/checkout-loop/#post-18980750)
 * Hi [@devancadman](https://wordpress.org/support/users/devancadman/)
 * Thank you for that update. That is very odd that the javascript variable is being
   renamed. There isn’t any code in the Stripe plugin that would alias that variable
   or rename it.
 * I believe that confirms something is renaming that variable but that wouldn’t
   be coming from the Stripe plugin.
 * Kind Regards
 *  Thread Starter [DevanToast](https://wordpress.org/support/users/devancadman/)
 * (@devancadman)
 * [2 days, 23 hours ago](https://wordpress.org/support/topic/checkout-loop/#post-18987175)
 * Hey Clayton,
   Sorry, you were right this was caused by another plugin:**Real-Time
   Find and Replace **– A rule had been setup to replace **“Stripe”** with **“Card”**.
   I have removed this and the issue is now fixed.Many Thanks,Devan

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcheckout-loop%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/woo-stripe-payment/assets/icon-256x256.png?rev=2611337)
 * [Payment Plugins for Stripe WooCommerce](https://wordpress.org/plugins/woo-stripe-payment/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-stripe-payment/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-stripe-payment/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-stripe-payment/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-stripe-payment/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-stripe-payment/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [DevanToast](https://wordpress.org/support/users/devancadman/)
 * Last activity: [2 days, 23 hours ago](https://wordpress.org/support/topic/checkout-loop/#post-18987175)
 * Status: resolved