From 9413589e8f32603878f69e67a04324bdd549698f Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 19 Dec 2017 14:19:12 -0200 Subject: [PATCH] Apply woocommerce_short_description filter before check if excerpt is empty Closes #18225 --- templates/single-product/short-description.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/templates/single-product/short-description.php b/templates/single-product/short-description.php index 441f7baa3e2..e3d631320f2 100644 --- a/templates/single-product/short-description.php +++ b/templates/single-product/short-description.php @@ -10,23 +10,25 @@ * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * - * @see https://docs.woocommerce.com/document/template-structure/ - * @author WooThemes - * @package WooCommerce/Templates - * @version 1.6.4 + * @see https://docs.woocommerce.com/document/template-structure/ + * @author Automattic + * @package WooCommerce/Templates + * @version 3.3.0 */ if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; // Exit if accessed directly. } global $post; -if ( ! $post->post_excerpt ) { +$short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt ); + +if ( ! $short_description ) { return; } ?>
- post_excerpt ); ?> +