Updated templates to handle new notices.

This commit is contained in:
Claudio Sanches 2019-11-07 20:24:37 -03:00
parent 7024fc8483
commit 08b761df4f
3 changed files with 21 additions and 27 deletions

View File

@ -10,26 +10,24 @@
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.5.0
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.9.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! $messages ) {
if ( ! $notices ) {
return;
}
?>
<ul class="woocommerce-error" role="alert">
<?php foreach ( $messages as $message ) : ?>
<li>
<?php
echo wc_kses_notice( $message );
?>
<?php foreach ( $notices as $notice ) : ?>
<li<?php echo wc_get_notice_data_attr( $notice ); ?>>
<?php echo wc_kses_notice( $notice['notice'] ); ?>
</li>
<?php endforeach; ?>
</ul>

View File

@ -10,25 +10,23 @@
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.5.0
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.9.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! $messages ) {
if ( ! $notices ) {
return;
}
?>
<?php foreach ( $messages as $message ) : ?>
<div class="woocommerce-info">
<?php
echo wc_kses_notice( $message );
?>
<?php foreach ( $notices as $notice ) : ?>
<div class="woocommerce-info"<?php echo wc_get_notice_data_attr( $notice ); ?>>
<?php echo wc_kses_notice( $notice['notice'] ); ?>
</div>
<?php endforeach; ?>

View File

@ -10,25 +10,23 @@
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.5.0
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates
* @version 3.9.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! $messages ) {
if ( ! $notices ) {
return;
}
?>
<?php foreach ( $messages as $message ) : ?>
<div class="woocommerce-message" role="alert">
<?php
echo wc_kses_notice( $message );
?>
<?php foreach ( $notices as $notice ) : ?>
<div class="woocommerce-message"<?php echo wc_get_notice_data_attr( $notice ); ?> role="alert">
<?php echo wc_kses_notice( $notice['notice'] ); ?>
</div>
<?php endforeach; ?>