WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Appearance::possibly_add_return_notice_script() public WC 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 6.1.1

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

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

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

	$script_assets_filename = Loader::get_script_asset_filename( 'wp-admin-scripts', 'onboarding-homepage-notice' );
	$script_assets          = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/' . $script_assets_filename;

	wp_enqueue_script(
		'onboarding-homepage-notice',
		Loader::get_url( 'wp-admin-scripts/onboarding-homepage-notice', 'js' ),
		array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
		WC_ADMIN_VERSION_NUMBER,
		true
	);
}