Automattic\WooCommerce\Internal\Caches

ProductVersionStringInvalidator::handle_edited_term │ public │ WC 10.5.0

Handle the edited_term hook.

Метод класса: ProductVersionStringInvalidator{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$ProductVersionStringInvalidator = new ProductVersionStringInvalidator();
$ProductVersionStringInvalidator->handle_edited_term( $term_id, $tt_id, $taxonomy ): void;
$term_id(int) (обязательный)
The term ID.
$tt_id(int) (обязательный)
The term taxonomy ID.
$taxonomy(строка) (обязательный)
The taxonomy slug.

Список изменений

С версии 10.5.0 Введена.

Код ProductVersionStringInvalidator::handle_edited_term() WC 11.2.2

public function handle_edited_term( $term_id, $tt_id, $taxonomy ): void {
	if ( ! is_string( $taxonomy ) ) {
		return;
	}

	// Only handle product attribute taxonomies.
	if ( 0 !== strpos( $taxonomy, 'pa_' ) ) {
		return;
	}

	$this->invalidate_products_with_term( (int) $tt_id );
}