Do not try updating gateway enabled on the connection tab

This commit is contained in:
Alex P 2022-09-27 16:49:40 +03:00
parent fd721ddbf8
commit f94211bf3f

View file

@ -281,12 +281,15 @@ class SettingsListener {
$credentials_change_status = null; // Cannot detect on Card Processing page.
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'] );
if ( Settings::CONNECTION_TAB_ID === $this->page_id ) {
$credentials_change_status = $this->determine_credentials_change_status( $settings );
}
if ( PayPalGateway::ID === $this->page_id ) {
$settings['enabled'] = isset( $_POST['woocommerce_ppcp-gateway_enabled'] )
&& 1 === absint( $_POST['woocommerce_ppcp-gateway_enabled'] );
}
// phpcs:enable phpcs:disable WordPress.Security.NonceVerification.Missing
// phpcs:enable phpcs:disable WordPress.Security.NonceVerification.Missing
if ( $credentials_change_status ) {