Merged in feature/117-dev-dev01 (pull request #8)

auto-patch  117-dev-dev01-2023-12-15T16_09_06

* auto-patch  117-dev-dev01-2023-12-15T16_09_06
This commit is contained in:
Tony Volpe
2023-12-15 16:10:57 +00:00
parent 0825f6bd5f
commit 3dc9eca989
1424 changed files with 28118 additions and 10097 deletions

View File

@@ -129,7 +129,7 @@ function wc_clear_notices() {
*
* @since 2.1
* @param bool $return true to return rather than echo. @since 3.5.0.
* @return string|null
* @return string|void
*/
function wc_print_notices( $return = false ) {
if ( ! did_action( 'woocommerce_init' ) ) {
@@ -137,7 +137,14 @@ function wc_print_notices( $return = false ) {
return;
}
$all_notices = WC()->session->get( 'wc_notices', array() );
$session = WC()->session;
// If the session handler has not initialized, there will be no notices for us to read.
if ( null === $session ) {
return;
}
$all_notices = $session->get( 'wc_notices', array() );
$notice_types = apply_filters( 'woocommerce_notice_types', array( 'error', 'success', 'notice' ) );
// Buffer output.