ActionScheduler_ActionFactory::store_unique_action()protectedWC 1.0

Store action if it's unique.

Method of the class: ActionScheduler_ActionFactory{}

No Hooks.

Return

Int. ID of the created action. Will be 0 if action was not created.

Usage

// protected - for code of main (parent) or child class
$result = $this->store_unique_action( $action );
$action(ActionScheduler_Action) (required)
Action object to store.

ActionScheduler_ActionFactory::store_unique_action() code WC 8.7.0

protected function store_unique_action( ActionScheduler_Action $action ) {
	$store = ActionScheduler_Store::instance();
	return method_exists( $store, 'save_unique_action' ) ?
		$store->save_unique_action( $action ) : $store->save_action( $action );
}