WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::get_action_status_by_post_status() protected WC 1.0

Get action status by post 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_action_status_by_post_status( $post_status );
$post_status(string) (required)
Post status.

Code of ActionScheduler_wpPostStore::get_action_status_by_post_status() WC 6.1.1

protected function get_action_status_by_post_status( $post_status ) {

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

	return $action_status;
}