Fix enqueue_scripts logic.

This commit is contained in:
Chris Aprea 2022-05-09 16:06:33 +10:00
parent ce2385d0d3
commit 0601a75e1c
1 changed files with 3 additions and 4 deletions

View File

@ -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() { public function enqueue_scripts() {
$current_page = PageController::get_instance()->get_current_page(); if ( ! PageController::get_instance()->is_registered_page() ) {
if ( ! isset( $current_page['id'] ) || $current_page['id'] !== $this->page_id ) {
return; return;
} }