From 8b70bea62a9b84669db3ede4ab71804d338278a9 Mon Sep 17 00:00:00 2001 From: asus Date: Wed, 27 Mar 2024 14:10:10 +0100 Subject: [PATCH] fixed error new prof choosing transfert can now access profil --- plugins/cipf_plugin/php/profs_form_commande.php | 4 ++++ plugins/cipf_plugin/php/redirections.php | 1 + plugins/fbpatch/php/fbpatch_class.php | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/cipf_plugin/php/profs_form_commande.php b/plugins/cipf_plugin/php/profs_form_commande.php index 10d99d7..8ef35e7 100644 --- a/plugins/cipf_plugin/php/profs_form_commande.php +++ b/plugins/cipf_plugin/php/profs_form_commande.php @@ -41,6 +41,7 @@ function prof_after_form_commande_CIPF($form_id, $post_array, $form_type) { * if paypal & expired card : 'to_pay' * if transfert $ expired card : 'waiting_invalid', reset transfert validation * if transfert $ valid card : 'waiting_valid' , reset transfert validation + * if transfert $ neither valid nor expired state : 'waiting_invalid' , reset transfert validation * */ if (is_payment_method_paypal_CIPF($user_id)) { @@ -58,6 +59,9 @@ function prof_after_form_commande_CIPF($form_id, $post_array, $form_type) { else if (is_account_valid_CIPF($user_id)) { set_account_waiting_valid_CIPF($user_id); } + else { + set_account_waiting_invalid_CIPF($user_id); + } reset_acf_transfert_CIPF($user_id); } } diff --git a/plugins/cipf_plugin/php/redirections.php b/plugins/cipf_plugin/php/redirections.php index 9b274c1..23f2741 100644 --- a/plugins/cipf_plugin/php/redirections.php +++ b/plugins/cipf_plugin/php/redirections.php @@ -72,6 +72,7 @@ function redirection_profil_CIPF(){ * */ if (current_user_can($role_prof)) { +error_log("is prof"); $user_page = get_author_posts_url($current_user_id); wp_redirect($user_page, 301); exit; diff --git a/plugins/fbpatch/php/fbpatch_class.php b/plugins/fbpatch/php/fbpatch_class.php index 953b5fd..1b4107e 100644 --- a/plugins/fbpatch/php/fbpatch_class.php +++ b/plugins/fbpatch/php/fbpatch_class.php @@ -180,9 +180,6 @@ class Fbpatch { self::$_post_id = $id; self::$_has_elements_to_skip = $is_to_skip; self::$_skip_elements = $skip_array; - - error_log("self::_post_id: " . json_encode(self::$_post_id)); - error_log("self::_skip_elements: " . json_encode(self::$_skip_elements)); } /*