Fix availability notice

This commit is contained in:
Pedro Silva 2023-10-16 12:07:07 +01:00
parent 8750cc01cc
commit 993191ff34
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -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();
}
}