Logout confirmation notice missing due to global (#50720)

* Missing global $wp

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Mike Jolley 2024-08-16 12:18:23 +01:00 committed by GitHub
parent 3170acd1b0
commit 66a717840f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Comment: Fixes missing global in unreleased code.

View File

@ -64,6 +64,8 @@ class WC_Shortcode_My_Account {
* logged out. See `woocommerce_my_account_message`.
*/
private static function my_account_add_notices() {
global $wp;
if ( ! is_user_logged_in() ) {
/**
* Filters the message shown on the 'my account' page when the user is not logged in.