mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Caught NotFoundException
in case it does not exist
This commit is contained in:
parent
f16045f343
commit
849b02e44f
1 changed files with 8 additions and 3 deletions
|
@ -21,6 +21,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Assets\SettingsPageAssets;
|
|||
use WooCommerce\PayPalCommerce\WcGateway\Checkout\CheckoutPayPalAddressPreset;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Checkout\DisableGateways;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Endpoint\ReturnUrlEndpoint;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Notice\ConnectAdminNotice;
|
||||
|
@ -139,9 +140,13 @@ class WCGatewayModule implements ModuleInterface {
|
|||
$settings = $c->get( 'wcgateway.settings' );
|
||||
assert( $settings instanceof Settings );
|
||||
|
||||
if ( $settings->get( '3d_secure_contingency' ) === '3D_SECURE' ) {
|
||||
$settings->set( '3d_secure_contingency', 'SCA_ALWAYS' );
|
||||
$settings->persist();
|
||||
try {
|
||||
if ( $settings->get( '3d_secure_contingency' ) === '3D_SECURE' ) {
|
||||
$settings->set( '3d_secure_contingency', 'SCA_ALWAYS' );
|
||||
$settings->persist();
|
||||
}
|
||||
} catch ( NotFoundException $exception ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue