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.
Method of the class: Products{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Products = new Products(); $Products->possibly_add_import_return_notice_script( $hook );
- $hook(string) (required)
- Page hook.
Products::possibly_add_import_return_notice_script() Products::possibly add import return notice script code WC 9.7.1
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 ); }