diff --git a/includes/wc-notice-functions.php b/includes/wc-notice-functions.php index cf5d7421108..43dd4f7a0de 100644 --- a/includes/wc-notice-functions.php +++ b/includes/wc-notice-functions.php @@ -80,7 +80,7 @@ function wc_print_notices() { foreach ( $notice_types as $notice_type ) { if ( wc_notice_count( $notice_type ) > 0 ) { woocommerce_get_template( "notices/{$notice_type}.php", array( - "{$notice_type}s" => $all_notices[$notice_type] + 'messages' => $all_notices[$notice_type] ) ); } } @@ -102,7 +102,7 @@ function wc_print_notice( $message, $notice_type = 'success' ) { $message = apply_filters( 'woocommerce_add_message', $message ); woocommerce_get_template( "notices/{$notice_type}.php", array( - "{$notice_type}s" => array( apply_filters( 'woocommerce_add_' . $notice_type, $message ) ) + 'messages' => array( apply_filters( 'woocommerce_add_' . $notice_type, $message ) ) ) ); } diff --git a/templates/notices/error.php b/templates/notices/error.php index 8b13c159d70..7f0281980d8 100644 --- a/templates/notices/error.php +++ b/templates/notices/error.php @@ -9,10 +9,10 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -if ( ! $errors ) return; +if ( ! $messages ) return; ?> \ No newline at end of file diff --git a/templates/notices/notice.php b/templates/notices/notice.php index c4b028d20d8..2f0b386c543 100644 --- a/templates/notices/notice.php +++ b/templates/notices/notice.php @@ -9,9 +9,9 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -if ( ! $notices ) return; +if ( ! $messages ) return; ?> - -
+ +
\ No newline at end of file