ActionScheduler_Store::get_scheduled_date_string_local
Get the time MySQL formatted date/time string for an action's (next) scheduled date.
Метод класса: ActionScheduler_Store{}
Хуков нет.
Возвращает
Строку.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_scheduled_date_string_local( $action, ?DateTime $scheduled_date );
- $action(ActionScheduler_Action|null) (обязательный)
- Action.
- ?DateTime $scheduled_date
- .
По умолчанию: null
Код ActionScheduler_Store::get_scheduled_date_string_local() ActionScheduler Store::get scheduled date string local WC 10.4.2
protected function get_scheduled_date_string_local( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) {
$next = is_null( $scheduled_date ) ? $action->get_schedule()->get_date() : $scheduled_date;
if ( ! $next ) {
$next = date_create();
}
ActionScheduler_TimezoneHelper::set_local_timezone( $next );
return $next->format( 'Y-m-d H:i:s' );
}