ActionScheduler_Store::get_scheduled_date_string
Get the time MySQL formatted date/time string for an action's (next) scheduled date.
Method of the class: ActionScheduler_Store{}
No Hooks.
Returns
String
.
Usage
// protected - for code of main (parent) or child class $result = $this->get_scheduled_date_string( $action, ?DateTime $scheduled_date );
- $action(ActionScheduler_Action) (required)
- Action.
- ?DateTime $scheduled_date
- .
Default: null
ActionScheduler_Store::get_scheduled_date_string() ActionScheduler Store::get scheduled date string code WC 9.8.5
protected function get_scheduled_date_string( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) { $next = is_null( $scheduled_date ) ? $action->get_schedule()->get_date() : $scheduled_date; if ( ! $next ) { $next = date_create(); } $next->setTimezone( new DateTimeZone( 'UTC' ) ); return $next->format( 'Y-m-d H:i:s' ); }