From 0601a75e1cfff3c3c39dddf5a21b6a583f1ec142 Mon Sep 17 00:00:00 2001 From: Chris Aprea Date: Mon, 9 May 2022 16:06:33 +1000 Subject: [PATCH] Fix enqueue_scripts logic. --- .../src/Internal/Admin/WcPaySubscriptionsPage.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/woocommerce/src/Internal/Admin/WcPaySubscriptionsPage.php b/plugins/woocommerce/src/Internal/Admin/WcPaySubscriptionsPage.php index c3ce8dd0582..0da7a57efc9 100644 --- a/plugins/woocommerce/src/Internal/Admin/WcPaySubscriptionsPage.php +++ b/plugins/woocommerce/src/Internal/Admin/WcPaySubscriptionsPage.php @@ -102,12 +102,11 @@ class WcPaySubscriptionsPage { } /** - * Enqueues an inline script on the WooCommerce → Subscriptions admin page. + * Enqueues an inline script WooCommerce registered pages for use + * on the WooCommerce → Subscriptions admin page. */ public function enqueue_scripts() { - $current_page = PageController::get_instance()->get_current_page(); - - if ( ! isset( $current_page['id'] ) || $current_page['id'] !== $this->page_id ) { + if ( ! PageController::get_instance()->is_registered_page() ) { return; }