ActionScheduler_ListTable::get_recurrence()
Returns the recurrence of an action or 'Non-repeating'. The output is human readable.
Method of the class: ActionScheduler_ListTable{}
No Hooks.
Return
String
.
Usage
// protected - for code of main (parent) or child class $result = $this->get_recurrence( $action );
- $action(ActionScheduler_Action) (required)
- -
ActionScheduler_ListTable::get_recurrence() ActionScheduler ListTable::get recurrence code WC 9.2.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' ); }