From ec10fa39045679c02f1656eda863493144cfac5a Mon Sep 17 00:00:00 2001 From: Jaydeep Rajgor Date: Tue, 17 Sep 2024 14:16:02 +0530 Subject: [PATCH] PFW-1889 Fix the is front page called incorrectly debug log --- ppcp-gateway/angelleye-paypal-ppcp-common-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppcp-gateway/angelleye-paypal-ppcp-common-functions.php b/ppcp-gateway/angelleye-paypal-ppcp-common-functions.php index cc6f31b72..cf899d7d9 100644 --- a/ppcp-gateway/angelleye-paypal-ppcp-common-functions.php +++ b/ppcp-gateway/angelleye-paypal-ppcp-common-functions.php @@ -1445,9 +1445,9 @@ function angelleye_ppcp_apple_google_vault_supported_country() { function angelleye_ppcp_pay_later_messaging() { $page = ''; - if (is_front_page() || is_home()) { + if ( (did_action('wp') && is_front_page()) || (did_action('wp') && is_home())) { $page = 'home'; - } elseif (is_product_category() || is_category()) { + } elseif (is_product_category() || (did_action('wp') && is_category())) { $page = 'category'; } elseif (is_product()) { $page = 'product';