You've already forked wc-bootstrap
28 lines
938 B
Twig
28 lines
938 B
Twig
|
|
{#
|
||
|
|
# Success Notice (Bootstrap 5 Override)
|
||
|
|
#
|
||
|
|
# Displays WooCommerce success notices as Bootstrap 5 success alerts.
|
||
|
|
#
|
||
|
|
# Expected context:
|
||
|
|
# notices - Array of notice objects, each with:
|
||
|
|
# notice - Notice HTML content (pre-sanitized via wc_kses_notice)
|
||
|
|
# data - Optional data attributes string
|
||
|
|
#
|
||
|
|
# WooCommerce PHP equivalent: notices/success.php
|
||
|
|
#
|
||
|
|
# @package WcBootstrap
|
||
|
|
# @since 0.1.0
|
||
|
|
#}
|
||
|
|
|
||
|
|
{% if notices is defined and notices|length > 0 %}
|
||
|
|
{% for notice in notices %}
|
||
|
|
<div class="alert alert-success alert-dismissible fade show woocommerce-message"
|
||
|
|
{{ notice.data|default('')|raw }}
|
||
|
|
role="alert">
|
||
|
|
<i class="bi bi-check-circle me-2" aria-hidden="true"></i>
|
||
|
|
{{ notice.notice|raw }}
|
||
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ __('Close') }}"></button>
|
||
|
|
</div>
|
||
|
|
{% endfor %}
|
||
|
|
{% endif %}
|