From 993191ff3452c2e714b7b043816653124d4fc193 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Mon, 16 Oct 2023 12:07:07 +0100 Subject: [PATCH] Fix availability notice --- modules/ppcp-googlepay/src/Helper/AvailabilityNotice.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-googlepay/src/Helper/AvailabilityNotice.php b/modules/ppcp-googlepay/src/Helper/AvailabilityNotice.php index 6ea3c0e62..82c250881 100644 --- a/modules/ppcp-googlepay/src/Helper/AvailabilityNotice.php +++ b/modules/ppcp-googlepay/src/Helper/AvailabilityNotice.php @@ -65,9 +65,12 @@ class AvailabilityNotice { return; } + // We need to check is active before checking failure requests, otherwise failure status won't be set. + $is_active = $this->product_status->is_active(); + if ( $this->product_status->has_request_failure() ) { $this->add_seller_status_failure_notice(); - } elseif ( ! $this->product_status->is_active() ) { + } elseif ( ! $is_active ) { $this->add_not_available_notice(); } }