public function update_item_permissions_check( $request ) {

		if ( ! $this->check_is_taxonomy_allowed( $this->taxonomy ) ) {
			return false;
		}

		$term = get_term( (int) $request['id'], $this->taxonomy );
		if ( ! $term ) {
			return new WP_Error( 'rest_term_invalid', __( "Resource doesn't exist." ), array( 'status' => 404 ) );
		}

		$taxonomy_obj = get_taxonomy( $this->taxonomy );
		if ( ! current_user_can( $taxonomy_obj->cap->edit_terms ) ) {
			return new WP_Error( 'rest_cannot_update', __( 'Sorry, you cannot update resource.' ), array( 'status' => rest_authorization_required_code() ) );
		}

		return true;
	}
public function update_item_permissions_check( $request ) {

		if ( ! $this->check_is_taxonomy_allowed( $this->taxonomy ) ) {
			return false;
		}

		$term = get_term( (int) $request['id'], $this->taxonomy );
		if ( ! $term ) {
			return new WP_Error( 'rest_term_invalid', __( "Resource doesn't exist." ), array( 'status' => 404 ) );
		}

		$taxonomy_obj = get_taxonomy( $this->taxonomy );
		if ( ! current_user_can( $taxonomy_obj->cap->edit_terms ) ) {
			return new WP_Error( 'rest_cannot_update', __( 'Sorry, you cannot update resource.' ), array( 'status' => rest_authorization_required_code() ) );
		}

		return true;
	}
public function update_item_permissions_check ( $ request ) { if ( ! $ this -> check_is_taxonomy_allowed ( $ this -> taxonomy ) ) { return false ; } $ term = get_term ( ( int ) $ request [ 'id' ] , $ this -> taxonomy ) ; if ( ! $ term ) { return new WP_Error ( 'rest_term_invalid' , __ ( "Resource doesn't exist." ) , array ( 'status' => 404 ) ) ; } $ taxonomy_obj = get_taxonomy ( $ this -> taxonomy ) ; if ( ! current_user_can ( $ taxonomy_obj -> cap -> edit_terms ) ) { return new WP_Error ( 'rest_cannot_update' , __ ( 'Sorry, you cannot update resource.' ) , array ( 'status' => rest_authorization_required_code ( ) ) ) ; } return true ; }
Checks if a request has access to update the specified term.

@param  WP_REST_Request $request Full details about the request.
@return WP_Error|boolean
Checks if a request has access to update the specified term .