diff --git a/includes/factories.php b/includes/factories.php index c0994b4..d449b8c 100644 --- a/includes/factories.php +++ b/includes/factories.php @@ -3,7 +3,7 @@ function unique_migration_persons() { - $transient = 'f71r4_my_onetime_check_metiers_45'; + $transient = 'f71r4_my_onetime_check_metiers_4577777'; if (!get_transient($transient)) { set_transient($transient, 'locked', 600); @@ -12,7 +12,7 @@ function unique_migration_persons() populate_personns(); } } -// add_action('init', 'unique_migration_persons'); +add_action('init', 'unique_migration_persons'); function build_ids_from_csv($csv_file) { @@ -52,10 +52,10 @@ function clean_persons() $persons = get_field('company_members', $postId); if (!$persons) continue; - if ($postId === '119' || $postId === 8203) { - $field_key = 'field_670d268f2b324'; - update_field($field_key, [], $postId); - } + $field_key = 'field_670d268f2b324'; + update_field($field_key, [], $postId); + // if ($postId === '119' || $postId === 8203) { + // } } } @@ -100,7 +100,7 @@ function populate_personns() $row = array_combine($headers, $data); - if ($row['company_id (NEW)'] === '119') { + // if ($row['company_id (NEW)'] === '119') { $post_fr_ID = $row['company_id (NEW)'] ?? null; if (!$post_fr_ID) continue; @@ -140,7 +140,7 @@ function populate_personns() // Fermer le fichier CSV fclose($handle); - } + // } }