…displayed The new logic displays the error message as an admin notice, like it's done when client_id and client_secret are missing. This allows to inform the user that the plugin won't work, without preventing him from configuring it. Note: the gateway will still be unavailable for payment, as it was done before.
Originally, checks were performed during class initialisation. This was premature, for two reasons: - Original check was setting "enabled" to false if plugin was not configured correctly. However, "enabled" and "usable" are two different concepts. When a gateway is enabled, it's enabled even when it's misconfigured. - WooCommerce checks if a gateway is usable by calling object->is_available(). That's when it's important to verify that settings are correct.