Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
Products::possibly_add_import_return_notice_script()
Adds a return to task list notice when completing the import product task.
Метод класса: Products{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Products = new Products(); $Products->possibly_add_import_return_notice_script( $hook );
- $hook(строка) (обязательный)
- Page hook.
Код Products::possibly_add_import_return_notice_script() Products::possibly add import return notice script WC 9.8.2
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 ); }