mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
fix account change behavior
This commit is contained in:
parent
8aa8b8de72
commit
4bc5254382
2 changed files with 2 additions and 2 deletions
|
@ -62,6 +62,7 @@ class DCCProductStatus {
|
|||
if ( is_bool( $this->current_status_cache ) ) {
|
||||
return $this->current_status_cache;
|
||||
}
|
||||
//var_dump($this->settings->has( 'products_dcc_enabled' ) && $this->settings->get( 'products_dcc_enabled' ));die;
|
||||
if ( $this->settings->has( 'products_dcc_enabled' ) && $this->settings->get( 'products_dcc_enabled' ) ) {
|
||||
$this->current_status_cache = true;
|
||||
return true;
|
||||
|
|
|
@ -259,7 +259,7 @@ class SettingsListener {
|
|||
|
||||
$credentials_change_status = null; // Cannot detect on Card Processing page.
|
||||
|
||||
if ( PayPalGateway::ID === $this->page_id ) {
|
||||
if ( PayPalGateway::ID === $this->page_id || Settings::CONNECTION_TAB_ID === $this->page_id ) {
|
||||
$settings['enabled'] = isset( $_POST['woocommerce_ppcp-gateway_enabled'] )
|
||||
&& 1 === absint( $_POST['woocommerce_ppcp-gateway_enabled'] );
|
||||
|
||||
|
@ -267,7 +267,6 @@ class SettingsListener {
|
|||
}
|
||||
// phpcs:enable phpcs:disable WordPress.Security.NonceVerification.Missing
|
||||
// phpcs:enable phpcs:disable WordPress.Security.NonceVerification.Missing
|
||||
|
||||
if ( $credentials_change_status ) {
|
||||
if ( self::CREDENTIALS_UNCHANGED !== $credentials_change_status ) {
|
||||
$this->settings->set( 'products_dcc_enabled', null );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue