WordPress at Your Fingertips
function is not described

WC_Shipping_Rate::add_meta_data() public WC 2.6.0

Add some meta data for this rate.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Shipping_Rate = new WC_Shipping_Rate();
$WC_Shipping_Rate->add_meta_data( $key, $value );
$key(string) (required)
Key.
$value(string) (required)
Value.

Changelog

Since 2.6.0 Introduced.

Code of WC_Shipping_Rate::add_meta_data() WC 5.6.0

public function add_meta_data( $key, $value ) {
	$this->meta_data[ wc_clean( $key ) ] = wc_clean( $value );
}