Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
Products::__construct
Constructor
Метод класса: Products{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Products = new Products(); $Products->__construct( $task_list );
- $task_list(TaskList) (обязательный)
- Parent task list.
Код Products::__construct() Products:: construct WC 10.5.0
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 );
}