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

Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Products::possibly_add_import_return_notice_script() public WC 1.0

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

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

Хуков нет.

Возвращает

null. Ничего.

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

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

Код Products::possibly_add_import_return_notice_script() WC 6.1.1

public function possibly_add_import_return_notice_script( $hook ) {
	$step = isset( $_GET['step'] ) ? $_GET['step'] : ''; // phpcs:ignore csrf ok, sanitization ok.

	if ( 'product_page_product_importer' !== $hook || 'done' !== $step ) {
		return;
	}

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

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

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