Files

21 lines
456 B
Twig
Raw Permalink Normal View History

{#
# Sale Flash Badge (Bootstrap 5 Override)
#
# Renders the sale badge on the single product page.
#
# Expected context:
# product - WC_Product object
# post - Global post object
#
# WooCommerce PHP equivalent: single-product/sale-flash.php
#
# @package WcBootstrap
# @since 0.1.0
#}
{% if product is defined and product.is_on_sale() %}
<span class="badge bg-danger fs-6 onsale">
{{ __('Sale!') }}
</span>
{% endif %}