Files
wc-bootstrap/templates/single-product/short-description.html.twig

24 lines
742 B
Twig
Raw Permalink Normal View History

{#
# Product Short Description (Bootstrap 5 Override)
#
# Expected context:
# product - WC_Product object (from TemplateOverride)
# short_description - Product short description HTML (optional)
#
# WooCommerce PHP equivalent: single-product/short-description.php
#
# @package WcBootstrap
# @since 0.1.0
#}
{# Compute short description when not passed as context. #}
{% if short_description is not defined %}
{% set short_description = apply_filters('woocommerce_short_description', product.get_short_description()) %}
{% endif %}
{% if short_description %}
<div class="woocommerce-product-details__short-description lead text-body-secondary mb-3">
{{ short_description|raw }}
</div>
{% endif %}