facetwp woocommerce term description

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php

if ( ! function_exists( ‘woocommerce_taxonomy_archive_description’ ) ) {
/**
* Show an archive description on taxonomy archives.
*/
function woocommerce_taxonomy_archive_description() {
if ( is_product_taxonomy() && 2 > absint( get_query_var( ‘paged’ ) ) ) {
$term = get_queried_object();

if ( $term && ! empty( $term->description ) ) {
echo ‘<div class=”term-description”>’ . wc_format_content( $term->description ) . ‘</div>’; // WPCS: XSS ok.
}
}
}
}
{{/gist}}