Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Tax::possibly_add_return_notice_script()publicWC 1.0

Adds a return to task list notice when completing the task.

Метод класса: Tax{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$Tax = new Tax();
$Tax->possibly_add_return_notice_script();

Код Tax::possibly_add_return_notice_script() WC 7.1.0

public function possibly_add_return_notice_script() {
	$page = isset( $_GET['page'] ) ? $_GET['page'] : ''; // phpcs:ignore csrf ok, sanitization ok.
	$tab  = isset( $_GET['tab'] ) ? $_GET['tab'] : ''; // phpcs:ignore csrf ok, sanitization ok.

	if ( $page !== 'wc-settings' || $tab !== 'tax' ) {
		return;
	}

	if ( ! $this->is_active() || $this->is_complete() ) {
		return;
	}

	WCAdminAssets::register_script( 'wp-admin-scripts', 'onboarding-tax-notice', true );
}