mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Do not remove vaulting capabilities when subscriptions is not selecting when onboarding
This commit is contained in:
parent
82af3c07c9
commit
24aa99fb80
1 changed files with 4 additions and 14 deletions
|
@ -87,13 +87,11 @@ class PartnerReferralsData {
|
||||||
'TRACKING_SHIPMENT_READWRITE',
|
'TRACKING_SHIPMENT_READWRITE',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( true === $use_subscriptions ) {
|
|
||||||
if ( $this->dcc_applies->for_country_currency() ) {
|
if ( $this->dcc_applies->for_country_currency() ) {
|
||||||
$capabilities[] = 'PAYPAL_WALLET_VAULTING_ADVANCED';
|
$capabilities[] = 'PAYPAL_WALLET_VAULTING_ADVANCED';
|
||||||
}
|
}
|
||||||
|
|
||||||
$first_party_features[] = 'BILLING_AGREEMENT';
|
$first_party_features[] = 'BILLING_AGREEMENT';
|
||||||
}
|
|
||||||
|
|
||||||
// Backwards compatibility. Keep those features in the #legacy-ui (null-value).
|
// Backwards compatibility. Keep those features in the #legacy-ui (null-value).
|
||||||
// Move this into the previous condition, once legacy code is removed.
|
// Move this into the previous condition, once legacy code is removed.
|
||||||
|
@ -102,14 +100,6 @@ class PartnerReferralsData {
|
||||||
$first_party_features[] = 'VAULT';
|
$first_party_features[] = 'VAULT';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( false === $use_subscriptions ) {
|
|
||||||
// Only use "ADVANCED_VAULTING" product for onboarding with subscriptions.
|
|
||||||
$products = array_filter(
|
|
||||||
$products,
|
|
||||||
static fn( $product ) => $product !== 'ADVANCED_VAULTING'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$payload = array(
|
$payload = array(
|
||||||
'partner_config_override' => array(
|
'partner_config_override' => array(
|
||||||
'return_url' => $return_url,
|
'return_url' => $return_url,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue