Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingSetupWizard::is_woocommerce_page()privateWC 1.0

Determine if the current page is one of the WC Admin pages.

Method of the class: OnboardingSetupWizard{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->is_woocommerce_page();

OnboardingSetupWizard::is_woocommerce_page() code WC 9.3.3

private function is_woocommerce_page() {
	$current_page = PageController::get_instance()->get_current_page();
	if ( ! $current_page || ! isset( $current_page['path'] ) ) {
		return false;
	}

	return 0 === strpos( $current_page['path'], 'wc-admin' );
}