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.

Method of the class: WC_Post_Data{}

No Hooks.

Return

null. Nothing (null).

Usage

$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.

Changelog

Deprecated since 3.6

WC_Post_Data::set_object_terms() code WC 8.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 ) ) {
		self::delete_product_query_transients();
	}
}