replace wc gateway settings with independent settings system

This commit is contained in:
David Remer 2020-07-02 09:37:07 +03:00
parent 621567da66
commit 4dadd6143f
16 changed files with 514 additions and 535 deletions

View file

@ -27,7 +27,7 @@ class Environment
public function currentEnvironment() : string
{
return (
$this->settings->has('sandbox_on') && wc_string_to_bool($this->settings->get('sandbox_on'))
$this->settings->has('sandbox_on') && $this->settings->get('sandbox_on')
) ? self::SANDBOX : self::PRODUCTION;
}

View file

@ -35,7 +35,7 @@ class State
/**
* Once we can fetch credentials we are completely onboarded.
*/
if ($this->settings->has('client_id')) {
if ($this->settings->has('client_id') && $this->settings->get('client_id')) {
$value = self::STATE_ONBOARDED;
}
return $value;