mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
do not overwrite values from a different gateway
This commit is contained in:
parent
3504a4ba34
commit
f5c4c0ec02
1 changed files with 6 additions and 0 deletions
|
@ -85,6 +85,12 @@ class SettingsListener
|
||||||
if (! in_array($this->state->currentState(), $config['screens'], true)) {
|
if (! in_array($this->state->currentState(), $config['screens'], true)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($config['gateway'] === 'dcc' && wp_unslash(sanitize_text_field($_GET['section'])) !== 'ppcp-credit-card-gateway') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($config['gateway'] === 'paypal' && wp_unslash(sanitize_text_field($_GET['section'])) !== 'ppcp-gateway') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
switch ($config['type']) {
|
switch ($config['type']) {
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
$settings[$key] = isset($rawData[$key]);
|
$settings[$key] = isset($rawData[$key]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue