Show multiple success messages/error messages if added, rather than one or the other
This commit is contained in:
parent
6f62606365
commit
750956ca4e
|
@ -147,6 +147,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Feature - Allow attributes to be added from the edit product page
|
||||
* Feature - Allow external products to be a part of a grouped product. Button titles will be respected when displayed.
|
||||
* Feature - Added woocommerce_get_dimension/woocommerce_get_weight helpers for normalisation. Thanks Andy Zhang
|
||||
* Tweak - Show multiple success messages/error messages if added, rather than one or the other
|
||||
* Tweak - Adding an item to an order now uses the ajax style product finder
|
||||
* Tweak - Updated chosen to latest release
|
||||
* Tweak - Changed recent order tables to make them slightly more compact
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
/**
|
||||
* Error messages
|
||||
*/
|
||||
if (!$errors) return;
|
||||
if ( ! $errors ) return;
|
||||
?>
|
||||
<ul class="woocommerce_error">
|
||||
<?php foreach ($errors as $error) : ?>
|
||||
<?php foreach ( $errors as $error ) : ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
|
@ -2,6 +2,9 @@
|
|||
/**
|
||||
* Messages
|
||||
*/
|
||||
if (!$messages || !isset($messages[0])) return;
|
||||
if ( ! $messages ) return;
|
||||
?>
|
||||
<div class="woocommerce_message"><?php echo $messages[0]; ?></div>
|
||||
|
||||
<?php foreach ( $messages as $message ) : ?>
|
||||
<div class="woocommerce_message"><?php echo $message; ?></div>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -128,7 +128,9 @@ if (!function_exists('woocommerce_show_messages')) {
|
|||
'errors' => $woocommerce->get_errors()
|
||||
));
|
||||
|
||||
} elseif ( $woocommerce->message_count() > 0 ) {
|
||||
}
|
||||
|
||||
if ( $woocommerce->message_count() > 0 ) {
|
||||
|
||||
woocommerce_get_template('shop/messages.php', array(
|
||||
'messages' => $woocommerce->get_messages()
|
||||
|
|
Loading…
Reference in New Issue