Do not handle vaulting settings change when not onboarded

Otherwise vaulting gets disabled after disconnect and re-onboarding
This commit is contained in:
Alex P 2022-05-12 17:37:56 +03:00
parent c3887bec7a
commit 65007a7bae

View file

@ -167,7 +167,7 @@ class SettingsListener {
* Prevent enabling both Pay Later messaging and PayPal vaulting
*/
public function listen_for_vaulting_enabled() {
if ( ! $this->is_valid_site_request() ) {
if ( ! $this->is_valid_site_request() || State::STATE_ONBOARDED !== $this->state->current_state() ) {
return;
}