WC_Post_Data::set_object_terms()public staticWC 1.0

Deprecated from version 3.6. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Delete transients when terms are set.

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

No Hooks.


null. Nothing.


$result = WC_Post_Data::set_object_terms( $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids );
$object_id(int) (required)
Object ID.
$terms(mixed) (required)
An array of object terms.
$tt_ids(array) (required)
An array of term taxonomy IDs.
$taxonomy(string) (required)
Taxonomy slug.
$append(mixed) (required)
Whether to append new terms to the old terms.
$old_tt_ids(array) (required)
Old array of term taxonomy IDs.


Deprecated 3.6

Code of WC_Post_Data::set_object_terms() WC 6.7.0

public static function set_object_terms( $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids ) {
	if ( in_array( get_post_type( $object_id ), array( 'product', 'product_variation' ), true ) ) {