activating migration transient
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b58b1536cd
commit
027301a4f5
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
function unique_migration_persons()
|
function unique_migration_persons()
|
||||||
{
|
{
|
||||||
$transient = 'f71r4_my_onetime_check_metiers_45';
|
$transient = 'f71r4_my_onetime_check_metiers_4577777';
|
||||||
if (!get_transient($transient)) {
|
if (!get_transient($transient)) {
|
||||||
set_transient($transient, 'locked', 600);
|
set_transient($transient, 'locked', 600);
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ function unique_migration_persons()
|
||||||
populate_personns();
|
populate_personns();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// add_action('init', 'unique_migration_persons');
|
add_action('init', 'unique_migration_persons');
|
||||||
|
|
||||||
function build_ids_from_csv($csv_file)
|
function build_ids_from_csv($csv_file)
|
||||||
{
|
{
|
||||||
|
|
@ -52,10 +52,10 @@ function clean_persons()
|
||||||
$persons = get_field('company_members', $postId);
|
$persons = get_field('company_members', $postId);
|
||||||
if (!$persons) continue;
|
if (!$persons) continue;
|
||||||
|
|
||||||
if ($postId === '119' || $postId === 8203) {
|
|
||||||
$field_key = 'field_670d268f2b324';
|
$field_key = 'field_670d268f2b324';
|
||||||
update_field($field_key, [], $postId);
|
update_field($field_key, [], $postId);
|
||||||
}
|
// if ($postId === '119' || $postId === 8203) {
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -100,7 +100,7 @@ function populate_personns()
|
||||||
$row = array_combine($headers, $data);
|
$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;
|
$post_fr_ID = $row['company_id (NEW)'] ?? null;
|
||||||
if (!$post_fr_ID) continue;
|
if (!$post_fr_ID) continue;
|
||||||
|
|
@ -140,7 +140,7 @@ function populate_personns()
|
||||||
|
|
||||||
// Fermer le fichier CSV
|
// Fermer le fichier CSV
|
||||||
fclose($handle);
|
fclose($handle);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user