You've already forked wc-bootstrap
21 lines
417 B
Twig
21 lines
417 B
Twig
|
|
{#
|
||
|
|
# Price Component (Bootstrap 5)
|
||
|
|
#
|
||
|
|
# Reusable price display with sale/regular price handling.
|
||
|
|
#
|
||
|
|
# Expected context:
|
||
|
|
# product - WC_Product object
|
||
|
|
#
|
||
|
|
# Usage:
|
||
|
|
# {% include 'components/price.html.twig' with { product: product } %}
|
||
|
|
#
|
||
|
|
# @package WcBootstrap
|
||
|
|
# @since 0.1.0
|
||
|
|
#}
|
||
|
|
|
||
|
|
{% if product.get_price_html() %}
|
||
|
|
<span class="price">
|
||
|
|
{{ product.get_price_html()|raw }}
|
||
|
|
</span>
|
||
|
|
{% endif %}
|