updated acf find non init field value with new technique to init with temp value first

This commit is contained in:
asus
2024-03-19 20:15:26 +01:00
parent cbfbfabd18
commit 58d02708b9
8 changed files with 154 additions and 36 deletions

View File

@@ -158,18 +158,8 @@ function renew_page_filter_message_CIPF(){
return;
$user_id = get_current_user_id();
$acf_id = 'user_'.$user_id;
$cipf_renew = new PLGNTLS_class();
$card_state = get_field($acf_card_state['_name'], $acf_id);
if ($card_state === 'Renouvellement') {
$cipf_renew->add_to_front(array(
array( 'css' => 'div#cipf_prof_carte_renouvellement {display: block;}' ),
array( 'css' => 'div#cipf_prof_carte_commande {display: none;}' ),
));
}
display_page_css_CIPF($user_id);
}
add_action('wp_enqueue_scripts', 'renew_page_filter_message_CIPF');