| @@ -345,9 +345,9 @@ | ||
| 345 | 345 | public function getAllowedFileTypes() |
| 346 | 346 | { |
| 347 | 347 | |
| 348 | 348 | $parser = $this->getParser(); |
| 349 | - $allowed_file_types = apply_filters('iwp/importer/datasource/allowed_file_types', ['xml', 'csv'], $this); | |
| 349 | + $allowed_file_types = apply_filters('iwp/importer/datasource/allowed_file_types', ['xml', 'csv', 'json'], $this); | |
| 350 | 350 | |
| 351 | 351 | if (!is_null($parser)) { |
| 352 | 352 | $allowed_file_types = [$parser]; |
| 353 | 353 | } |
| @@ -388,8 +388,14 @@ | ||
| 388 | 388 | public function getDetaultFileSettings() |
| 389 | 389 | { |
| 390 | 390 | switch ($this->getParser()) { |
| 391 | 391 | case 'xml': |
| 392 | + return [ | |
| 393 | + 'base_path' => null, | |
| 394 | + 'setup' => false | |
| 395 | + ]; | |
| 396 | + break; | |
| 397 | + case 'json': | |
| 392 | 398 | return [ |
| 393 | 399 | 'base_path' => null, |
| 394 | 400 | 'setup' => false |
| 395 | 401 | ]; |