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:
parent
3170acd1b0
commit
66a717840f
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: tweak
|
||||||
|
Comment: Fixes missing global in unreleased code.
|
||||||
|
|
|
@ -64,6 +64,8 @@ class WC_Shortcode_My_Account {
|
||||||
* logged out. See `woocommerce_my_account_message`.
|
* logged out. See `woocommerce_my_account_message`.
|
||||||
*/
|
*/
|
||||||
private static function my_account_add_notices() {
|
private static function my_account_add_notices() {
|
||||||
|
global $wp;
|
||||||
|
|
||||||
if ( ! is_user_logged_in() ) {
|
if ( ! is_user_logged_in() ) {
|
||||||
/**
|
/**
|
||||||
* Filters the message shown on the 'my account' page when the user is not logged in.
|
* Filters the message shown on the 'my account' page when the user is not logged in.
|
||||||
|
|
Loading…
Reference in New Issue