Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Products::__construct()publicWC 1.0

Constructor

Method of the class: Products{}

No Hooks.

Return

null. Nothing (null).

Usage

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

Products::__construct() code WC 9.7.1

public function __construct( $task_list ) {
	parent::__construct( $task_list );
	add_action( 'admin_enqueue_scripts', array( $this, 'possibly_add_manual_return_notice_script' ) );
	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, 'delete_product_count_cache' ) );
	add_action( 'woocommerce_new_product', array( $this, 'delete_product_count_cache' ) );
	add_action( 'wp_trash_post', array( $this, 'delete_product_count_cache' ) );
	add_action( 'untrashed_post', array( $this, 'delete_product_count_cache' ) );
}