In WooCommerce, customers can typically manage their saved payment methods via the “My Account” page. However, some store owners report an issue when users try to add a new payment method:
This warning indicates that WooCommerce is trying to access data that doesn’t exist – likely due to a missing or misconfigured payment gateway.
🧾 What Causes This?
-
No active payment gateway that supports saving payment methods (e.g. Stripe or Braintree)
-
Conflict or outdated plugin
-
Broken or deleted saved method
-
Incompatible WooCommerce version
✅ How to Fix It
-
Install a gateway that supports stored methods
-
Use plugins like WooCommerce Stripe, PayPal Vault, or Braintree.
-
Make sure they are fully set up and authenticated via API.
-
-
Update all plugins
-
WooCommerce and its extensions must be updated to ensure compatibility.
-
-
Remove or hide the “Payment Methods” tab
-
If you don’t use gateways with stored methods, you can hide that tab with this code:
-
-
Use debugging tools
-
Enable
WP_DEBUG
inwp-config.php
to trace issues. -
Check WooCommerce → Status → Logs for more detail.
-
💡 Summary
If users receive PHP warnings when trying to add payment methods in their WooCommerce account page, it usually means that:
-
There’s no active gateway handling saved methods, or
-
Something’s broken due to a plugin or theme conflict.
To solve it:
-
Set up a proper payment gateway (like Stripe),
-
Keep your plugins up to date,
-
Or simply hide the Payment Methods tab to prevent confusion.
This ensures a cleaner, bug-free experience on your store’s customer dashboard.