diff --git a/modules.local/ppcp-wc-gateway/src/Exception/NotFoundException.php b/modules.local/ppcp-wc-gateway/src/Exception/NotFoundException.php new file mode 100644 index 000000000..20759fc5d --- /dev/null +++ b/modules.local/ppcp-wc-gateway/src/Exception/NotFoundException.php @@ -0,0 +1,12 @@ +gateway->get_option($settingsKey); + if (!$this->has($id)) { + throw new NotFoundException(); + } + return $this->gateway->get_option($id); + } + + public function has($id) + { + return array_key_exists($id, $this->formFields->fields()); } }