Command::update_item( $args, $assoc_args )
Update an existing item.
Contents
Source Source
File: libraries/lifterlms-cli/src/Commands/Restful/Command.php
295 296 297 298 299 300 301 302 | public function update_item( $args , $assoc_args ) { list( $status , $body ) = $this ->do_request( 'POST' , $this ->get_filled_route( $args ), $assoc_args ); if ( \WP_CLI\Utils\get_flag_value( $assoc_args , 'porcelain' ) ) { \WP_CLI::line( $body [ 'id' ] ); } else { \WP_CLI::success( "Updated {$this->name} {$body['id']}." ); } } |
Expand full source code Collapse full source code View on GitHub