Populate_From_Query::change_recipe_type()

Changes recipe type to logged-in.


Return Return

(bool)


Source Source

File: src/core/classes/class-populate-from-query.php

	public static function change_recipe_type() {

		$_POST['post_ID']     = self::$post->ID;
		$_POST['recipe_type'] = 'user';

		$recipe_type_changed = self::$recipe->change_post_recipe_type( '' );

		if ( ! $recipe_type_changed->data['success'] ) {

			throw new \Exception( "Recipe type couldn't be changed." );

		}

		return true;

	}