Do not remove vaulting capabilities when subscriptions is not selecting when onboarding

This commit is contained in:
Emili Castells Guasch 2025-05-23 12:42:33 +02:00
parent 82af3c07c9
commit 24aa99fb80
No known key found for this signature in database

View file

@ -87,14 +87,12 @@ 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.
if ( false !== $use_subscriptions ) { if ( false !== $use_subscriptions ) {
@ -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,