From 9bb6774d464b5cb4041910c0b8eac258c50ace23 Mon Sep 17 00:00:00 2001 From: Adam Cassis Date: Fri, 20 Sep 2024 13:07:18 +0200 Subject: [PATCH] fix: prevent PHP notice while checking my-account page --- .../reader-revenue/my-account/class-woocommerce-my-account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/reader-revenue/my-account/class-woocommerce-my-account.php b/includes/reader-revenue/my-account/class-woocommerce-my-account.php index 98f579aa60..f30442048f 100644 --- a/includes/reader-revenue/my-account/class-woocommerce-my-account.php +++ b/includes/reader-revenue/my-account/class-woocommerce-my-account.php @@ -449,7 +449,7 @@ public static function verify_saved_account_details() { */ public static function is_from_my_account() { // If we're in My Account. - if ( function_exists( 'is_account_page' ) && \is_account_page() ) { + if ( did_action( 'wp' ) && function_exists( 'is_account_page' ) && \is_account_page() ) { return true; }