Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Populate_From_Query::change_recipe_type()

Changes recipe type to logged-in.

Contents


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;
	}