Automattic\WooCommerce\Admin\Features\OnboardingTasks

DeprecatedExtendedTask::__construct()publicWC 1.0

Constructor.

{} Это метод класса: DeprecatedExtendedTask{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$DeprecatedExtendedTask = new DeprecatedExtendedTask();
$DeprecatedExtendedTask->__construct( $task_list, $args );
$task_list(TaskList) (обязательный)
Parent task list.
$args(массив) (обязательный)
Array of task args.

Код DeprecatedExtendedTask::__construct() WC 6.4.1

public function __construct( $task_list, $args ) {
	parent::__construct( $task_list );
	$task_args = wp_parse_args(
		$args,
		array(
			'id'              => null,
			'is_dismissable'  => false,
			'is_snoozeable'   => false,
			'can_view'        => true,
			'level'           => 3,
			'additional_info' => null,
			'content'         => '',
			'title'           => '',
			'is_complete'     => false,
			'time'            => null,
		)
	);

	$this->id              = $task_args['id'];
	$this->additional_info = $task_args['additional_info'];
	$this->content         = $task_args['content'];
	$this->is_complete     = $task_args['is_complete'];
	$this->is_dismissable  = $task_args['is_dismissable'];
	$this->is_snoozeable   = $task_args['is_snoozeable'];
	$this->can_view        = $task_args['can_view'];
	$this->level           = $task_args['level'];
	$this->time            = $task_args['time'];
	$this->title           = $task_args['title'];
}