class Consultation extends Base {
public function __construct() {
$this->set_form_title(__('E-diagnostic', 'ccv'));
- if (defined('TEST_EMAIL')) {
- $this->destination = TEST_EMAIL;
- }
}
// 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')]);
+ }
}
}
}