mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix phpcs
This commit is contained in:
parent
c008e0eaa5
commit
129fba0439
1 changed files with 9 additions and 6 deletions
|
@ -62,13 +62,16 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
|||
$billing_agreements_endpoint = $c->get( 'api.endpoint.billing-agreements' );
|
||||
assert( $billing_agreements_endpoint instanceof BillingAgreementsEndpoint );
|
||||
|
||||
add_action( 'woocommerce_paypal_payments_gateway_migrate_on_update', function() use($settings, $billing_agreements_endpoint) {
|
||||
add_action(
|
||||
'woocommerce_paypal_payments_gateway_migrate_on_update',
|
||||
function() use ( $settings, $billing_agreements_endpoint ) {
|
||||
$reference_transaction_enabled = $billing_agreements_endpoint->reference_transaction_enabled();
|
||||
if ( $reference_transaction_enabled !== true ) {
|
||||
$settings->set( 'vault_enabled', false );
|
||||
$settings->persist();
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
if (
|
||||
( ! $settings->has( 'vault_enabled' ) || ! $settings->get( 'vault_enabled' ) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue