Automattic\WooCommerce\Admin\Features\OnboardingTasks

Task::undo_dismiss()publicWC 1.0

Undo task dismissal.

{} It's a method of the class: Task{}

No Hooks.

Return

true|false.

Usage

$Task = new Task();
$Task->undo_dismiss();

Code of Task::undo_dismiss() WC 6.9.4

public function undo_dismiss() {
	$dismissed = get_option( self::DISMISSED_OPTION, array() );
	$dismissed = array_diff( $dismissed, array( $this->get_id() ) );
	$update    = update_option( self::DISMISSED_OPTION, $dismissed );

	if ( $update ) {
		$this->record_tracks_event( 'undo_dismiss_task', array( 'task_name' => $this->get_id() ) );
	}

	return $update;
}