ly_remove_reminder_bar() { $bar_hidden = get_option( self::REMINDER_BAR_HIDDEN_OPTION, 'no' ); $active_for_four_weeks = WCAdminHelper::is_wc_admin_active_for( WEEK_IN_SECONDS * 4 ); if ( 'yes' === $bar_hidden || ! $active_for_four_weeks ) { return; } update_option( self::REMINDER_BAR_HIDDEN_OPTION, 'yes' ); } /** * Get the list for use in JSON. * * @return array */ public function get_json() { $this->possibly_track_completion(); $tasks_json = array(); foreach ( $this->tasks as $task ) { $json = $task->get_json(); if ( $json['canView'] ) { $tasks_json[] = $json; } } return array( 'id' => $this->get_list_id(), 'title' => $this->title, 'isHidden' => $this->is_hidden(), 'isVisible' => $this->is_visible(), 'isComplete' => $this->is_complete(), 'tasks' => $tasks_json, 'eventPrefix' => $this->prefix_event( '' ), 'displayProgressHeader' => $this->display_progress_header, 'keepCompletedTaskList' => $this->get_keep_completed_task_list(), ); } }