Automattic\WooCommerce\Admin\Features\OnboardingTasks

Task::undo_dismiss()publicWC 1.0

Undo task dismissal.

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

Хуков нет.

Возвращает

true|false.

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

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

Код Task::undo_dismiss() WC 6.4.1

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;
}