Merge pull request #17640 from woocommerce/fix/17616

Grab description directly to pass through wc_format_content
This commit is contained in:
Claudio Sanches 2017-11-09 16:45:00 -02:00 committed by GitHub
commit f78b0aac13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -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 '<div class="term-description">' . $description . '</div>'; // WPCS: XSS ok.
$term = get_queried_object();
if ( $term && ! empty( $term->description ) ) {
echo '<div class="term-description">' . wc_format_content( $term->description ) . '</div>'; // WPCS: XSS ok.
}
}
}