WordPress at Your Fingertips
function is not described

WC_Product_Importer::set_meta_data() protected WC 1.0

Append meta data.

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

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->set_meta_data( $product, $data );
$product(WC_Product) (required) (passed by reference — &)
Product instance.
$data(array) (required)
Item data.

Code of WC_Product_Importer::set_meta_data() WC 5.6.0

protected function set_meta_data( &$product, $data ) {
	if ( isset( $data['meta_data'] ) ) {
		foreach ( $data['meta_data'] as $meta ) {
			$product->update_meta_data( $meta['key'], $meta['value'] );
		}
	}
}