woocommerce_taxonomy_archive_description()
Show an archive description on taxonomy archives.
Hooks from the function
Return
null
. Nothing (null).
Usage
woocommerce_taxonomy_archive_description();
woocommerce_taxonomy_archive_description() woocommerce taxonomy archive description code WC 9.4.2
function woocommerce_taxonomy_archive_description() { if ( is_product_taxonomy() && 0 === absint( get_query_var( 'paged' ) ) ) { $term = get_queried_object(); if ( $term ) { /** * Filters the archive's raw description on taxonomy archives. * * @since 6.7.0 * * @param string $term_description Raw description text. * @param WP_Term $term Term object for this taxonomy archive. */ $term_description = apply_filters( 'woocommerce_taxonomy_archive_description_raw', $term->description, $term ); if ( ! empty( $term_description ) ) { echo '<div class="term-description">' . wc_format_content( wp_kses_post( $term_description ) ) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } } }