WC_Product::set_tag_ids()publicWC 3.0.0

Set the product tags.

Method of the class: WC_Product{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Product = new WC_Product();
$WC_Product->set_tag_ids( $term_ids );
$term_ids(array) (required)
List of terms IDs.

Changelog

Since 3.0.0 Introduced.

WC_Product::set_tag_ids() code WC 8.6.1

public function set_tag_ids( $term_ids ) {
	$this->set_prop( 'tag_ids', array_unique( array_map( 'intval', $term_ids ) ) );
}