Automattic\WooCommerce\StoreApi\Schemas\V1

ProductSchema::prepare_product_attribute_taxonomy_value()protectedWC 1.0

Prepare an attribute term for the response.

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

Хуков нет.

Возвращает

Объект.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->prepare_product_attribute_taxonomy_value( $term );
$term(\WP_Term) (обязательный)
Term object.

Код ProductSchema::prepare_product_attribute_taxonomy_value() WC 8.7.0

protected function prepare_product_attribute_taxonomy_value( \WP_Term $term ) {
	return $this->prepare_product_attribute_value( $term->name, $term->term_id, $term->slug );
}