Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Appearance::possibly_add_return_notice_script()publicWC 1.0

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

{} Это метод класса: Appearance{}

Хуков нет.

Возвращает

null. Ничего.

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

$Appearance = new Appearance();
$Appearance->possibly_add_return_notice_script( $hook );
$hook(строка) (обязательный)
Page hook.

Код Appearance::possibly_add_return_notice_script() WC 7.1.0

public function possibly_add_return_notice_script( $hook ) {
	global $post;

	if ( $hook !== 'post.php' || $post->post_type !== 'page' ) {
		return;
	}

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

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