mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
✨ Allow filtering of card-payment flags
These filters allow to add backwards compatibility
This commit is contained in:
parent
42b357d8a6
commit
704bf7f20c
1 changed files with 16 additions and 4 deletions
|
@ -224,11 +224,23 @@ class CardPaymentsConfiguration {
|
|||
return;
|
||||
}
|
||||
|
||||
$this->is_enabled = $is_dcc_enabled;
|
||||
/**
|
||||
* Filters the "Card Payments Enabled" status. This allows other modules
|
||||
* to override the flag.
|
||||
*/
|
||||
$this->is_enabled = (bool) apply_filters(
|
||||
'woocommerce_paypal_payments_is_card_payment_enabled',
|
||||
$is_dcc_enabled
|
||||
);
|
||||
|
||||
if ( $this->dcc_applies->for_country_currency() ) {
|
||||
$this->use_acdc = true;
|
||||
}
|
||||
/**
|
||||
* Filters the "ACDC" state. When a filter callback sets this to false
|
||||
* the plugin assumes to be in BCDC mode.
|
||||
*/
|
||||
$this->use_acdc = (bool) apply_filters(
|
||||
'woocommerce_paypal_payments_is_acdc_active',
|
||||
$this->dcc_applies->for_country_currency()
|
||||
);
|
||||
|
||||
/**
|
||||
* Changing this to true (and hiding the watermark) has potential legal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue