WordPress at Your Fingertips
function is not described

WC_Data::delete_meta_data_by_mid() public WC 2.6.0

Delete meta data.

{} It's a method of the class: WC_Data{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Data = new WC_Data();
$WC_Data->delete_meta_data_by_mid( $mid );
$mid(int) (required)
Meta ID.

Changelog

Since 2.6.0 Introduced.

Code of WC_Data::delete_meta_data_by_mid() WC 5.8.0

public function delete_meta_data_by_mid( $mid ) {
	$this->maybe_read_meta_data();
	$array_keys = array_keys( wp_list_pluck( $this->meta_data, 'id' ), (int) $mid, true );

	if ( $array_keys ) {
		foreach ( $array_keys as $array_key ) {
			$this->meta_data[ $array_key ]->value = null;
		}
	}
}