woocommerce_taxonomy_archive_description()WC 1.0

Show an archive description on taxonomy archives.

Хуков нет.

Возвращает

null. Ничего.

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

woocommerce_taxonomy_archive_description();

Код woocommerce_taxonomy_archive_description() WC 6.5.1

function woocommerce_taxonomy_archive_description() {
	if ( is_product_taxonomy() && 0 === absint( get_query_var( 'paged' ) ) ) {
		$term = get_queried_object();

		if ( $term && ! empty( $term->description ) ) {
			echo '<div class="term-description">' . wc_format_content( wp_kses_post( $term->description ) ) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		}
	}
}