How to Resolve the “Cannot Read Properties of Null (Reading ‘Submit’)” Error in WooCommerce Stripe Payment Gateway

A recent update to WooCommerce and Stripe’s payment processing has caused many sites using the legacy WooCommerce Stripe Payment Gateway to fail with a console error:

Cannot read properties of null (reading 'submit')

This issue occurs when outdated versions of the Stripe or WooCommerce plugin conflict with Stripe’s latest API requirements. In this guide, we’ll walk through how Freshy’s support team diagnosed and resolved the issue by updating the site’s environment safely using a staging site.

Issue Background

The client’s WooCommerce store began experiencing a checkout failure using the legacy Stripe payment method. Upon review, the issue stemmed from JavaScript errors triggered by the Stripe script during form submission.

The critical error in the console log read:

Uncaught TypeError: Cannot read properties of null (reading 'submit')

This broke the checkout form, preventing transactions from processing.

Because this update was part of a broader change affecting all users of WooCommerce Stripe Gateway, the task was logged as recurring billable support to ensure updates would be maintained through the transition.

Diagnosis

The support team followed these steps to identify the problem:

  1. Created a staging site to safely test updates in an isolated environment. This ensured that the live checkout process remained unaffected while testing the Stripe integration.
  2. Reproduced the issue by enabling the legacy Stripe payment method in test mode.
  3. Checked the JavaScript console — the error Cannot read properties of null (reading 'submit') confirmed the bug originated from outdated plugin code referencing deprecated form handlers.
  4. Compared plugin versions of both WooCommerce and WooCommerce Stripe Gateway on staging vs. live. The live site was running older versions.

Resolution Steps

Once the issue was verified on staging, the following actions were taken:

  1. Updated all plugins on the staging site — including WooCommerce, Stripe Gateway, and dependencies such as WooCommerce Blocks and WooCommerce Admin. Keeping these plugins up to date is crucial not only to resolve compatibility errors like this but also to patch security vulnerabilities and prevent future bugs or conflicts.
  2. Reconnected the Stripe account in live mode using the updated gateway settings to ensure API tokens were refreshed.
  3. Tested transactions in Stripe test mode, verifying both successful payment authorization and email suppression.
  4. Deployed updates to the live site once all tests passed successfully on staging.

The development notes confirm that the error is tied directly to outdated versions:

“All plugins must be up to date, otherwise it generates the error ‘Cannot read properties of null (reading ‘submit’)’.”

Final Outcome

After updating the plugins and reconnecting Stripe, the checkout functioned correctly in both test and live modes. No further console errors appeared, and payments processed as expected.

This fix is broadly applicable to any WooCommerce store running an outdated version of the WooCommerce Stripe Payment Gateway plugin. Because Stripe’s API changes are global, keeping plugins updated will prevent recurring errors of this type leading up to Stripe’s full legacy deprecation.

Key Takeaway

If you’re seeing the error Cannot read properties of null (reading 'submit') after updating WooCommerce or Stripe, it’s likely due to an outdated plugin version. Always:

  • Create a staging site before performing updates.
  • Update all WooCommerce-related plugins, not just Stripe Gateway.
  • Test in Stripe’s test mode before going live.
  • Reconnect your Stripe account to refresh API credentials.

Need help updating WooCommerce or resolving Stripe integration issues? Contact Freshy — our WordPress experts can safely perform these updates, troubleshoot errors, and ensure your online store runs smoothly.