protected function delete_meta_value( $object_id, $name ) {
		if ( ! current_user_can( 'delete_post_meta', $object_id, $name ) ) {
			return new WP_Error(
				'rest_cannot_delete',
				sprintf( __( 'You do not have permission to edit the %s custom field.' ), $name ),
				array( 'key' => $name, 'status' => rest_authorization_required_code() )
			);
		}

		if ( ! delete_metadata( $this->get_meta_type(), $object_id, wp_slash( $name ) ) ) {
			return new WP_Error(
				'rest_meta_database_error',
				__( 'Could not delete meta value from database.' ),
				array( 'key' => $name, 'status' => WP_Http::INTERNAL_SERVER_ERROR )
			);
		}

		return true;
	}
protected function delete_meta_value( $object_id, $name ) {
		if ( ! current_user_can( 'delete_post_meta', $object_id, $name ) ) {
			return new WP_Error(
				'rest_cannot_delete',
				sprintf( __( 'You do not have permission to edit the %s custom field.' ), $name ),
				array( 'key' => $name, 'status' => rest_authorization_required_code() )
			);
		}

		if ( ! delete_metadata( $this->get_meta_type(), $object_id, wp_slash( $name ) ) ) {
			return new WP_Error(
				'rest_meta_database_error',
				__( 'Could not delete meta value from database.' ),
				array( 'key' => $name, 'status' => WP_Http::INTERNAL_SERVER_ERROR )
			);
		}

		return true;
	}
protected function delete_meta_value ( $ object_id , $ name ) { if ( ! current_user_can ( 'delete_post_meta' , $ object_id , $ name ) ) { return new WP_Error ( 'rest_cannot_delete' , sprintf ( __ ( 'You do not have permission to edit the %s custom field.' ) , $ name ) , array ( 'key' => $ name , 'status' => rest_authorization_required_code ( ) ) ) ; } if ( ! delete_metadata ( $ this -> get_meta_type ( ) , $ object_id , wp_slash ( $ name ) ) ) { return new WP_Error ( 'rest_meta_database_error' , __ ( 'Could not delete meta value from database.' ) , array ( 'key' => $ name , 'status' => WP_Http :: INTERNAL_SERVER_ERROR ) ) ; } return true ; }
Delete meta value for an object.

@param int    $object_id Object ID the field belongs to.
@param string $name      Key for the field.
@return bool|WP_Error True if meta field is deleted, error otherwise.
Delete meta value for an object .