From: Vincent Vanwaelscappel Date: Mon, 6 Feb 2023 18:11:44 +0000 (+0100) Subject: wip #5666 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e7b64288456f6617fa15eae91791295b5ade2643;p=ccv-wordpress.git wip #5666 @0.5 --- diff --git a/wp-content/mu-plugins/cube/src/Forms/Consultation.php b/wp-content/mu-plugins/cube/src/Forms/Consultation.php index 4d7d17f..7bc7973 100644 --- a/wp-content/mu-plugins/cube/src/Forms/Consultation.php +++ b/wp-content/mu-plugins/cube/src/Forms/Consultation.php @@ -17,9 +17,6 @@ use function Roots\asset; class Consultation extends Base { public function __construct() { $this->set_form_title(__('E-diagnostic', 'ccv')); - if (defined('TEST_EMAIL')) { - $this->destination = TEST_EMAIL; - } } @@ -146,7 +143,9 @@ class Consultation extends Base { // If a surgeon is selected, send the form directly to them $surgeons = $this->get_field('surgeon')->get_options(); if (!empty($this->get_data('surgeon')) && array_key_exists($this->get_data('surgeon'), $surgeons)) { - $this->set_destination($surgeons[$this->get_data('surgeon')]); + if (!defined('ENV') || ENV !== 'dev') { + $this->set_destination($surgeons[$this->get_data('surgeon')]); + } } } }