Add filters to override ApplePay and GooglePay product status checks.

This commit is contained in:
Pedro Silva 2024-02-13 15:04:08 +00:00
parent 42f3e575bc
commit e37177725e
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 10 additions and 0 deletions

View file

@ -100,6 +100,11 @@ class AppleProductStatus {
return false;
}
$status_override = apply_filters( 'woocommerce_paypal_payments_apple_pay_product_status', null );
if ( null !== $status_override ) {
return $status_override;
}
// If status was already checked on this request return the same result.
if ( null !== $this->current_status ) {
return $this->current_status;

View file

@ -100,6 +100,11 @@ class ApmProductStatus {
return false;
}
$status_override = apply_filters( 'woocommerce_paypal_payments_google_pay_product_status', null );
if ( null !== $status_override ) {
return $status_override;
}
// If status was already checked on this request return the same result.
if ( null !== $this->current_status ) {
return $this->current_status;