2026-02-28 10:19:10 +01:00
|
|
|
{#
|
|
|
|
|
# Error Notice (Bootstrap 5 Override)
|
|
|
|
|
#
|
|
|
|
|
# Displays WooCommerce error notices as a Bootstrap 5 danger alert.
|
|
|
|
|
# Multiple errors are shown as a list within a single alert.
|
|
|
|
|
#
|
|
|
|
|
# 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/error.php
|
|
|
|
|
#
|
|
|
|
|
# @package WcBootstrap
|
|
|
|
|
# @since 0.1.0
|
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
{% if notices is defined and notices|length > 0 %}
|
|
|
|
|
<div class="alert alert-danger alert-dismissible fade show woocommerce-error" role="alert">
|
|
|
|
|
<i class="bi bi-exclamation-triangle me-2" aria-hidden="true"></i>
|
|
|
|
|
{% if notices|length == 1 %}
|
|
|
|
|
{{ notices[0].notice|raw }}
|
|
|
|
|
{% else %}
|
|
|
|
|
<ul class="mb-0 ps-3">
|
|
|
|
|
{% for notice in notices %}
|
2026-03-01 01:02:43 +01:00
|
|
|
<li {{ notice.data|default('')|wp_kses_post }}>
|
2026-02-28 10:19:10 +01:00
|
|
|
{{ notice.notice|raw }}
|
|
|
|
|
</li>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</ul>
|
|
|
|
|
{% endif %}
|
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ __('Close') }}"></button>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|