most account states updating are working

This commit is contained in:
asus
2024-03-19 13:06:16 +01:00
parent 5010b70d79
commit aad98c5188
4 changed files with 153 additions and 89 deletions

View File

@@ -33,8 +33,13 @@ function prof_after_form_CIPF($form_id, $post_array, $form_type) {
/*
* change status to :
* if new prof & paypal : 'to pay'
* if expired card & paypal : 'to_pay'
* if paypal & new prof : 'to pay'
* if paypal & expired card : 'to_pay'
* if transfert $ expired card : 'waiting_invalid'
* if transfert $ valid card : 'waiting_valid'
*
*
*
*
*/
if (is_payment_method_paypal_CIPF()) {
@@ -45,6 +50,14 @@ function prof_after_form_CIPF($form_id, $post_array, $form_type) {
set_account_to_pay_CIPF();
}
}
else if (is_payment_method_transfert_CIPF()) {
if (is_account_expired_CIPF()) {
set_account_waiting_invalid_CIPF();
}
else if (is_account_valid_CIPF()) {
set_account_waiting_valid_CIPF();
}
}
}
add_action('df_after_process', 'prof_after_form_CIPF', 10, 3);
@@ -129,7 +142,7 @@ add_action('template_redirect', 'prof_form_restrictions_CIPF');
/*
* enqueue scripts on page prof
* enqueue scripts and styles on page prof
*
* on the renew card page for prof
* output the right message, depending of the status of the card