Warning: This method has been deprecated.

WC_Post_Data::set_object_terms( int $object_id, mixed $terms, array $tt_ids, string $taxonomy, mixed $append, array $old_tt_ids )

Delete transients when terms are set.


Description Description


Parameters Parameters

$object_id

(Required) Object ID.

$terms

(Required) An array of object terms.

$tt_ids

(Required) An array of term taxonomy IDs.

$taxonomy

(Required) Taxonomy slug.

$append

(Required) Whether to append new terms to the old terms.

$old_tt_ids

(Required) Old array of term taxonomy IDs.


Top ↑

Source Source

File: includes/class-wc-post-data.php

	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();
		}
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.6 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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