Populate_From_Query::populate()

Populates the recipe.


Return Return

(bool)


Source Source

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

	protected static function populate() {

		switch ( $_GET['action'] ) {

			case 'add-new-trigger':
				if ( self::query_args_exist( array( 'item_code' ) ) ) {

					return self::add_new_trigger();

				} else {

					throw new \Exception( 'Missing item code.' );

				}

				break;

			default:
				throw new \Exception( 'Unknown action.' );

				break;
		}

		return true;

	}