| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | { |
| 33 | 33 | $state->populate($state_data); |
| 34 | 34 | |
| 35 | 35 | if (!$state->validate($config['id'])) { |
| 36 | - throw new \Exception("Importer session has changed"); | |
| 36 | + throw new \Exception(__("Importer session has changed", 'jc-importer')); | |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | if ($state->has_status('running')) { |
| 40 | 40 | |
| @@ -59,11 +59,11 @@ | ||
| 59 | 59 | |
| 60 | 60 | // generate list of items to be deleted |
| 61 | 61 | $object_ids = $this->importer->getMapper()->get_objects_for_removal(); |
| 62 | 62 | |
| 63 | - $config = get_site_option('iwp_importer_config_' . $id); | |
| 63 | + $config = get_option('iwp_importer_config_' . $id); | |
| 64 | 64 | $config['delete_ids'] = $object_ids; |
| 65 | - update_site_option('iwp_importer_config_' . $id, $config); | |
| 65 | + update_option('iwp_importer_config_' . $id, $config); | |
| 66 | 66 | |
| 67 | 67 | $state_data['progress']['delete']['start'] = 0; |
| 68 | 68 | $state_data['progress']['delete']['end'] = $object_ids ? count($object_ids) : 0; |
| 69 | 69 | } else { |
| @@ -84,9 +84,9 @@ | ||
| 84 | 84 | |
| 85 | 85 | // Get increase index, locking record, and saving to user importer state |
| 86 | 86 | if (!empty($state_data['section'])) { |
| 87 | 87 | $state_data['progress'][$state_data['section']]['current_row']++; |
| 88 | - update_site_option('iwp_importer_state_' . $id . '_' . $user, array_merge($state_data, ['last_modified' => current_time('timestamp')])); | |
| 88 | + update_option('iwp_importer_state_' . $id . '_' . $user, array_merge($state_data, ['last_modified' => current_time('timestamp')])); | |
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $state_data['duration'] = floatval($state_data['duration'] ?? 0) + Logger::timer(); |
| @@ -187,9 +187,9 @@ | ||
| 187 | 187 | if ($section === 'delete') { |
| 188 | 188 | if ($this->importer->getMapper()->permission() && $this->importer->getMapper()->permission()->allowed_method('remove')) { |
| 189 | 189 | |
| 190 | 190 | $GLOBALS['wp_object_cache']->delete('iwp_importer_config_' . $id, 'options'); |
| 191 | - $config = get_site_option('iwp_importer_config_' . $id); | |
| 191 | + $config = get_option('iwp_importer_config_' . $id); | |
| 192 | 192 | $i = $progress['current_row'] - 1; |
| 193 | 193 | |
| 194 | 194 | $object_ids = $config['delete_ids']; |
| 195 | 195 | if ($object_ids && count($object_ids) > $i) { |