short-description check
Apply woocommerce_short_description filter before check if excerpt is empty; Per new Woo template files;
This commit is contained in:
parent
da3cdfa847
commit
0ee0b8a44f
|
@ -22,11 +22,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
global $post;
|
||||
|
||||
if ( ! $post->post_excerpt ) {
|
||||
$short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt );
|
||||
|
||||
if ( ! $short_description ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div itemprop="description" class="lead">
|
||||
<?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?>
|
||||
<div class="woocommerce-product-details__short-description">
|
||||
<?php echo $short_description; // WPCS: XSS ok. ?>
|
||||
</div>
|
||||
|
|
Reference in New Issue