fieldType; } /** * @since 3.0.0 */ public function fieldType(string $fieldType): MultiSelect { if (!in_array($fieldType, ['checkbox', 'dropdown'])) { throw new InvalidArgumentException(__('Field type must be either "checkbox" or "dropdown".', 'give')); } $this->fieldType = $fieldType; return $this; } }