LLMS_REST_API_Keys_Controller::update_item( WP_REST_Request $request )

Update an API Key


Parameters Parameters

$request

(WP_REST_Request) (Required) Request object.


Top ↑

Return Return

(WP_Error|WP_REST_Response)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/class-llms-rest-api-keys-controller.php

	/**
	 * Update an API Key
	 *
	 * @since 1.0.0-beta.1
	 * @since 1.0.0-beta.27 Handle custom rest fields registered via `register_rest_field()`.
	 *
	 * @param WP_REST_Request $request Request object.
	 * @return WP_Error|WP_REST_Response
	 */
	public function update_item( $request ) {

		$prepared = $this->prepare_item_for_database( $request );
		$key      = LLMS_REST_API()->keys()->update( $prepared );
		if ( is_wp_error( $request ) ) {


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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