+{% endif %} diff --git a/templates/notices/error.html.twig b/templates/notices/error.html.twig new file mode 100644 index 0000000..2aca260 --- /dev/null +++ b/templates/notices/error.html.twig @@ -0,0 +1,34 @@ +{# + # 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 %} + +{% endif %} diff --git a/templates/notices/notice.html.twig b/templates/notices/notice.html.twig new file mode 100644 index 0000000..132ebde --- /dev/null +++ b/templates/notices/notice.html.twig @@ -0,0 +1,27 @@ +{# + # Info Notice (Bootstrap 5 Override) + # + # Displays WooCommerce info/neutral notices as Bootstrap 5 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/notice.php + # + # @package WcBootstrap + # @since 0.1.0 + #} + +{% if notices is defined and notices|length > 0 %} + {% for notice in notices %} +
+ + {{ notice.notice|raw }} + +
+ {% endfor %} +{% endif %} diff --git a/templates/notices/success.html.twig b/templates/notices/success.html.twig new file mode 100644 index 0000000..938ad46 --- /dev/null +++ b/templates/notices/success.html.twig @@ -0,0 +1,27 @@ +{# + # 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 %} + + {% endfor %} +{% endif %}