WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::save_action() public WC 1.0

Save action.

{} It's a method of the class: ActionScheduler_wpPostStore{}

Hooks from the method

Return

Int.

Usage

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->save_action( $action, $scheduled_date );
$action(ActionScheduler_Action) (required)
Scheduled Action.
$scheduled_date(DateTime)
Scheduled Date.
Default: null

Code of ActionScheduler_wpPostStore::save_action() WC 6.1.1

public function save_action( ActionScheduler_Action $action, DateTime $scheduled_date = null ) {
	try {
		$this->validate_action( $action );
		$post_array = $this->create_post_array( $action, $scheduled_date );
		$post_id    = $this->save_post_array( $post_array );
		$this->save_post_schedule( $post_id, $action->get_schedule() );
		$this->save_action_group( $post_id, $action->get_group() );
		do_action( 'action_scheduler_stored_action', $post_id );
		return $post_id;
	} catch ( Exception $e ) {
		/* translators: %s: action error message */
		throw new RuntimeException( sprintf( __( 'Error saving action: %s', 'woocommerce' ), $e->getMessage() ), 0 );
	}
}