Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Products::possibly_add_import_return_notice_script()publicWC 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 7.1.0

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

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

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

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