Delete metadata for the specified object.

Signature

delete_metadata( $meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = false )
meta_type
 (string) Type of object metadata is for (e.g., comment, post, or user)
object_id
 (int) ID of the object metadata is for
meta_key
 (string) Metadata key
meta_value
 (mixed) Optional. Metadata value. Must be serializable if non-scalar. If specified, only delete metadata entries with this value. Otherwise, delete all entries with the specified meta_key.
Default: ''
delete_all
 (boolean) Optional, default is false. If true, delete matching metadata entries for all objects, ignoring the specified object_id. Otherwise, only delete matching metadata entries for the specified object_id.
Default: false

Return

(boolean) True on successful delete, false on failure.

Source

function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = false) {
	global $wpdb;

	if ( ! $meta_type || ! $meta_key || ! is_numeric( $object_id ) && ! $delete_all ) {
		return false;
	}

	$object_id = absint( $object_id );
	if ( ! $object_id && ! $delete_all ) {
		return false;
	}

	$table = _get_meta_table( $meta_type );
	if ( ! $table ) {
		return false;
	}

	$type_column = sanitize_key($meta_type . '_id');
	$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
	// expected_slashed ($meta_key)
113 more lines...
WP Trac GitHub

Link here