]> _ Git - ccv-wordpress.git/commitdiff
wip #5666 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 6 Feb 2023 18:11:44 +0000 (19:11 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 6 Feb 2023 18:11:44 +0000 (19:11 +0100)
wp-content/mu-plugins/cube/src/Forms/Consultation.php

index 4d7d17f22b6e9c04df70619672ce135e3160f6ba..7bc7973ceab12cbd50532d32b734d326fdb6ce30 100644 (file)
@@ -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')]);
+                       }
                }
        }
 }