Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Products::__constructpublicWC 1.0

Constructor

Method of the class: Products{}

No Hooks.

Returns

null. Nothing (null).

Usage

$Products = new Products();
$Products->__construct( $task_list );
$task_list(TaskList) (required)
Parent task list.

Products::__construct() code WC 10.3.6

public function __construct( $task_list ) {
	parent::__construct( $task_list );
	add_action( 'admin_enqueue_scripts', array( $this, 'possibly_add_import_return_notice_script' ) );
	add_action( 'admin_enqueue_scripts', array( $this, 'possibly_add_load_sample_return_notice_script' ) );

	add_action( 'woocommerce_update_product', array( $this, 'maybe_set_has_product_transient' ), 10, 2 );
	add_action( 'woocommerce_new_product', array( $this, 'maybe_set_has_product_transient' ), 10, 2 );
	add_action( 'untrashed_post', array( $this, 'maybe_set_has_product_transient_on_untrashed_post' ) );
	add_action( 'current_screen', array( $this, 'maybe_redirect_to_add_product_tasklist' ), 30, 0 );
}