WC_Product::set_category_ids( array $term_ids )

Set the product categories.


Description Description


Parameters Parameters

$term_ids

(array) (Required) List of terms IDs.


Top ↑

Source Source

File: includes/abstracts/abstract-wc-product.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.