From 0d09d0c0fdab95447d425ce9e9eb141d89bbab72 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 9 Nov 2017 16:57:50 +0000 Subject: [PATCH] Grab description directly to pass through wc_format_content --- includes/wc-template-functions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 442821fa05f..b6f7b781b5f 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -684,9 +684,10 @@ if ( ! function_exists( 'woocommerce_taxonomy_archive_description' ) ) { */ function woocommerce_taxonomy_archive_description() { if ( is_product_taxonomy() && 0 === absint( get_query_var( 'paged' ) ) ) { - $description = wc_format_content( term_description() ); - if ( $description ) { - echo '
' . $description . '
'; // WPCS: XSS ok. + $term = get_queried_object(); + + if ( $term && ! empty( $term->description ) ) { + echo '
' . wc_format_content( $term->description ) . '
'; // WPCS: XSS ok. } } }