Command::create_item( $args,  $assoc_args )

Create a new item.


Source Source

File: libraries/lifterlms-cli/src/Commands/Restful/Command.php

	public function create_item( $args, $assoc_args ) {
		list( $status, $body ) = $this->do_request( 'POST', $this->get_base_route(), $assoc_args );
		if ( \WP_CLI\Utils\get_flag_value( $assoc_args, 'porcelain' ) ) {
			\WP_CLI::line( $body['id'] );
		} else {
			\WP_CLI::success( "Created {$this->name} {$body['id']}." );
		}
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.