Automattic\WooCommerce\Admin\Features\OnboardingTasks
DeprecatedExtendedTask::__construct
Constructor.
Method of the class: DeprecatedExtendedTask{}
No Hooks.
Returns
null. Nothing (null).
Usage
$DeprecatedExtendedTask = new DeprecatedExtendedTask(); $DeprecatedExtendedTask->__construct( $task_list, $args );
- $task_list(TaskList) (required)
- Parent task list.
- $args(array) (required)
- Array of task args.
DeprecatedExtendedTask::__construct() DeprecatedExtendedTask:: construct code WC 10.7.0
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'];
}