ray */ public function get_status_labels() { return array( self::STATUS_COMPLETE => __( 'Complete', 'woocommerce' ), self::STATUS_PENDING => __( 'Pending', 'woocommerce' ), self::STATUS_RUNNING => __( 'In-progress', 'woocommerce' ), self::STATUS_FAILED => __( 'Failed', 'woocommerce' ), self::STATUS_CANCELED => __( 'Canceled', 'woocommerce' ), ); } /** * Check if there are any pending scheduled actions due to run. * * @param ActionScheduler_Action $action * @param DateTime $scheduled_date (optional) * @return string */ public function has_pending_actions_due() { $pending_actions = $this->query_actions( array( 'date' => as_get_datetime_object(), 'status' => ActionScheduler_Store::STATUS_PENDING, ) ); return ! empty( $pending_actions ); } /** * Callable initialization function optionally overridden in derived classes. */ public function init() {} /** * Callable function to mark an action as migrated optionally overridden in derived classes. */ public function mark_migrated( $action_id ) {} /** * @return ActionScheduler_Store */ public static function instance() { if ( empty( self::$store ) ) { $class = apply_filters( 'action_scheduler_store_class', self::DEFAULT_CLASS ); self::$store = new $class(); } return self::$store; } }