WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::get_post_status_by_action_status() protected WC 1.0

Get post status by action status.

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

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_post_status_by_action_status( $action_status );
$action_status(string) (required)
Action status.

Code of ActionScheduler_wpPostStore::get_post_status_by_action_status() WC 6.1.1

protected function get_post_status_by_action_status( $action_status ) {

	switch ( $action_status ) {
		case self::STATUS_COMPLETE:
			$post_status = 'publish';
			break;
		case self::STATUS_CANCELED:
			$post_status = 'trash';
			break;
		default:
			if ( ! array_key_exists( $action_status, $this->get_status_labels() ) ) {
				throw new InvalidArgumentException( sprintf( 'Invalid action status: "%s".', $action_status ) );
			}
			$post_status = $action_status;
			break;
	}

	return $post_status;
}