ActionScheduler_ListTable::get_recurrence
Returns the recurrence of an action or 'Non-repeating'. The output is human readable.
Метод класса: ActionScheduler_ListTable{}
Хуков нет.
Возвращает
Строку.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_recurrence( $action );
- $action(ActionScheduler_Action) (обязательный)
- Action object.
Код ActionScheduler_ListTable::get_recurrence() ActionScheduler ListTable::get recurrence WC 10.4.3
protected function get_recurrence( $action ) {
$schedule = $action->get_schedule();
if ( $schedule->is_recurring() && method_exists( $schedule, 'get_recurrence' ) ) {
$recurrence = $schedule->get_recurrence();
if ( is_numeric( $recurrence ) ) {
/* translators: %s: time interval */
return sprintf( __( 'Every %s', 'woocommerce' ), self::human_interval( $recurrence ) );
} else {
return $recurrence;
}
}
return __( 'Non-repeating', 'woocommerce' );
}