Title: Fatal error on undefined function is_add_payment_method_page()
Last modified: August 31, 2026

---

# Fatal error on undefined function is_add_payment_method_page()

 *  Resolved [GDU](https://wordpress.org/support/users/gettingdownunder/)
 * (@gettingdownunder)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/fatal-error-on-undefined-function-is_add_payment_method_page/)
 * Hi,
 * I’m getting a fatal error triggered on every page load, not just checkout, which
   is causing a 500 error on unrelated pages of my site (in my case, a custom job
   alerts page).
 * Environment: WooCommerce 11.0.1, PHP 8.3.33
 * The error from my debug log:
 * PHP Fatal error: Uncaught Error: Call to undefined function PaymentPlugins\Stripe\
   is_add_payment_method_page() in wp-content/plugins/woo-stripe-payment/src/ContextHandler.
   php:92
   Stack trace: 0 wp-includes/class-wp-hook.php(353): PaymentPlugins\Stripe\
   ContextHandler->initialize() 1 wp-includes/class-wp-hook.php(377): WP_Hook->apply_filters()
   2 wp-includes/plugin.php(571): WP_Hook->do_action() 3 wp-includes/class-wp.php(
   838): do_action_ref_array() 4 wp-includes/functions.php(1352): WP->main() 5 wp-
   blog-header.php(16): wp() 6 index.php(17): require()
 * Since ContextHandler->initialize() is hooked into an action that fires on every
   front end page load, the fatal error crashes any page, not just WooCommerce pages.
 * I checked the plugin files directly and is_add_payment_method_page() is called
   across several files (ContextHandler.php, RequestContext.php, LinkIntegration.
   php, wc-stripe-functions.php, and a couple of the gateway classes), but I could
   not find it defined anywhere within the plugin itself. It looks like it is expected
   to fall back to WooCommerce core’s conditional tag of the same name in the global
   namespace.
 * I am currently using Freesoul Deactivate Plugins to deactivate Woo Stripe Payment
   Gateway specifically on the affected page as a workaround, which does resolve
   the crash there.
 * Could you let me know:
    1. Under what conditions is_add_payment_method_page() might not be available when
       ContextHandler->initialize() runs?
    2. Whether this is a known compatibility issue with WooCommerce 11.0.1?
 * Happy to provide more info as required
 * Thanks in advance.

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

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/fatal-error-on-undefined-function-is_add_payment_method_page/#post-19007097)
 * Hi [@gettingdownunder](https://wordpress.org/support/users/gettingdownunder/)
 * Thank you for contacting Payment Plugins. The function `is_add_payment_method_page`
   is part of WooCommerce core and has been for a very long time so it definitely
   exists in version 11.0.1 which you are using.
 * The ContextHandler::initialize method is called when the `wp` action triggers.
   WooCommerce loads the `includes/wc-conditional-functions.php` file, which defines`
   is_add_payment_method_page` right when the WooCommerce plugin file is loaded 
   which is before the `wp`, `init` and `plugins_loaded` actions . That means that
   the function should be defined unless something on your site is causing actions
   to trigger out of the normal order or something is skipping the loading of WooCommerce.
 * Kind Regards
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [1 week, 1 day ago](https://wordpress.org/support/topic/fatal-error-on-undefined-function-is_add_payment_method_page/#post-19008823)
 * Hi [@gettingdownunder](https://wordpress.org/support/users/gettingdownunder/)
 * Following up on this request.
 * Kind Regards

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-on-undefined-function-is_add_payment_method_page%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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * Last activity: [1 week, 1 day ago](https://wordpress.org/support/topic/fatal-error-on-undefined-function-is_add_payment_method_page/#post-19008823)
 * Status: resolved