wip account states
This commit is contained in:
@@ -12,15 +12,21 @@ if (!defined('ABSPATH')) {
|
||||
|
||||
|
||||
/*
|
||||
* when form is validated, reset some fields
|
||||
* when form is validated
|
||||
* - reset some fields
|
||||
* - change account state
|
||||
*
|
||||
*/
|
||||
function prof_form_reset_fields_CIPF($form_id, $post_array, $form_type) {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$acf_cgv = PLGNTLS_class::ACF_PROF_CGV;
|
||||
$acf_account_state = PLGNTLS_class::ACF_ACCOUNT_STATE;
|
||||
|
||||
$user_id = get_current_user_id();
|
||||
update_field($acf_cgv['_name'], array(""), 'user_'.$user_id);
|
||||
$acf_id = 'user_'.$user_id;
|
||||
|
||||
update_field($acf_cgv['_name'], array(""), $acf_id);
|
||||
update_field($acf_account_state['_name'], $acf_account_state['to_pay'], $acf_id);
|
||||
}
|
||||
//add_action('df_before_process', 'prof_form_reset_fields_CIPF', 10, 3);
|
||||
add_action('df_after_process', 'prof_form_reset_fields_CIPF', 10, 3);
|
||||
|
||||
Reference in New Issue
Block a user