ActionScheduler_DBStoreMigrator::save_action( ActionScheduler_Action $action, DateTime $scheduled_date = null, DateTime $last_attempt_date = null )
Save an action with optional last attempt date.
Description Description
Normally, saving an action sets its attempted date to 0000-00-00 00:00:00 because when an action is first saved, it can’t have been attempted yet, but migrated completed actions will have an attempted date, so we need to save that when first saving the action.
Parameters Parameters
- $action
-
(Required)
- $scheduled_date
-
(Optional) date of the first instance to store.
Default value: null
- $last_attempt_date
-
(Optional) date the action was last attempted.
Default value: null
Return Return
(string) The action ID
Source Source
File: packages/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php