Title: Fatal: WC_Stripe_Plugins_Page_Controller::enqueue_scripts()
Last modified: May 12, 2026

---

# Fatal: WC_Stripe_Plugins_Page_Controller::enqueue_scripts()

 *  Resolved [Camilo](https://wordpress.org/support/users/camiloluna/)
 * (@camiloluna)
 * [2 weeks, 3 days ago](https://wordpress.org/support/topic/fatal-wc_stripe_plugins_page_controllerenqueue_scripts/)
 * I’m getting a fatal error on the latest (10.6.1) version of the plugin as described
   below.
 * **Error**
 *     ```wp-block-code
       Uncaught TypeError: WC_Stripe_Plugins_Page_Controller::enqueue_scripts():
       Argument #1 ($hook_suffix) must be of type string, null given,
       called in wp-includes/class-wp-hook.php on line 324
       and defined in plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-plugins-page-controller.php:38
       ```
   
 * Stack trace shows the action being dispatched from `iframe_header()` (`wp-admin/
   includes/template.php:2156`), which Event Tickets calls from `Tribe__Tickets__Admin__Move_Tickets::
   dialog()`.
 * **Steps to reproduce**
    1. Activate WooCommerce, WooCommerce Stripe Gateway, and The Events Calendar + 
       Event Tickets.
    2. Create an event with tickets and at least one attendee.
    3. Go to Events → Attendees, select an attendee, choose Move.
    4. The “Move Attendees” iframe dialog opens and the request fatals.
 * **Root cause**
 * `WC_Stripe_Plugins_Page_Controller::enqueue_scripts()` declares a strict string`
   $hook_suffix` parameter:
 *     ```wp-block-code
       public function enqueue_scripts( string $hook_suffix ) {
           if ( 'plugins.php' !== $hook_suffix ) { return; }
           ...
       }
       ```
   
 * WordPress core’s `iframe_header()` calls `do_action( 'admin_enqueue_scripts',
   $hook_suffix )` using the global `$hook_suffix`, which is null in any iframe 
   context where the global was never populated (Event Tickets’ Move Attendees and
   Move Tickets dialogs, Press This, the legacy plugin upload iframe, etc.). With
   a strict scalar typehint and no nullable annotation, the call fatals on PHP 7
   +.
 * **Suggested fix (with AI help)**
 * Either:
    - Relax the signature to ?string $hook_suffix = null and treat null as “not 
      on plugins.php”, or
    - Cast at the boundary: `$hook_suffix = is_string( $hook_suffix ) ? $hook_suffix:'';`
      before the equality check.
 * Either avoids the TypeError without changing existing behavior — the method already
   early-returns for anything that isn’t ‘plugins.php’.

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

 *  Plugin Support [Frank Remmy (woo-hc)](https://wordpress.org/support/users/frankremmy/)
 * (@frankremmy)
 * [2 weeks, 3 days ago](https://wordpress.org/support/topic/fatal-wc_stripe_plugins_page_controllerenqueue_scripts/#post-18906064)
 * Hi [@camiloluna](https://wordpress.org/support/users/camiloluna/),
 * Thank you for the detailed report and for digging into the root cause. That’s
   really helpful!
 * Good news: this exact issue has already been fixed. The patch was merged two 
   weeks ago: [https://github.com/woocommerce/woocommerce-gateway-stripe/pull/5346](https://github.com/woocommerce/woocommerce-gateway-stripe/pull/5346),
   and will be included in the upcoming 10.7.0 release.
 * Once 10.7.0 is available, updating should resolve the fatal error entirely and
   you’ll be able to move tickets between events without running into it again. 
   If you’ve rolled back to an earlier version in the meantime, just update to 10.7.0
   when it’s out and you’ll be all set.
 * I hope that helps. Let us know if you need anything else.
 *  Thread Starter [Camilo](https://wordpress.org/support/users/camiloluna/)
 * (@camiloluna)
 * [2 weeks, 3 days ago](https://wordpress.org/support/topic/fatal-wc_stripe_plugins_page_controllerenqueue_scripts/#post-18906486)
 * Hi [@frankremmy](https://wordpress.org/support/users/frankremmy/),
 * Appreciate the promptly reply!
 * Since a fix is already on the way, I’ll mark this as resolved and will reopen
   if needed in the future.
 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [2 weeks, 3 days ago](https://wordpress.org/support/topic/fatal-wc_stripe_plugins_page_controllerenqueue_scripts/#post-18906513)
 * Hi there!
 * Thank you for your cooperation and understanding.
 * Before you go, If you’ve found the Stripe Gateway for WooCommerce plugin helpful
   for your store, we’d really appreciate a 5-star review here: [https://wordpress.org/support/plugin/woocommerce-gateway-stripe/reviews/#new-post](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/reviews/#new-post)

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

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

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

 * 3 replies
 * 3 participants
 * Last reply from: [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * Last activity: [2 weeks, 3 days ago](https://wordpress.org/support/topic/fatal-wc_stripe_plugins_page_controllerenqueue_scripts/#post-18906513)
 * Status: resolved