'email', 'label' => esc_html__('Email', 'daytidy'), 'required' => 1, 'system' => 'email' ]); } // Add Last Name if (!$last_name && isset($fields['booking']['fields']['booking'])) { array_unshift($fields['booking']['fields']['booking'], [ 'type' => 'text', 'label' => esc_html__('Last Name', 'daytidy'), 'required' => 1, 'system' => 'last_name' ]); } // Add First Name if (!$first_name && isset($fields['booking']['fields']['booking'])) { array_unshift($fields['booking']['fields']['booking'], [ 'type' => 'text', 'label' => esc_html__('First Name', 'daytidy'), 'required' => 1, 'system' => 'first_name' ]); } } return $fields; } /** * @return array */ public function default(): array { return [ 'booking' => [ 'fields' => [ 'booking' => [], 'participant' => [], ], ], 'modules' => [ 'booking' => [] ] ]; } }