v 0.3.10 admin can validate payment from front

This commit is contained in:
asus
2024-03-20 11:42:22 +01:00
parent 58f287f00f
commit 0717a7d9e4
6 changed files with 92 additions and 16 deletions

View File

@@ -10,6 +10,39 @@ if (!defined('ABSPATH')) {
/*
* actions after prof form transfert validation is processed
*
*/
function prof_after_form_transfert_validation_CIPF($form_id, $post_array, $form_type) {
PLGNTLS_class::debug_infos();
$acf_account_state = PLGNTLS_class::ACF_ACCOUNT_STATE;
$form_prof_transfert_id = PLGNTLS_class::FORM_PROF_TRANSFERT_ID;
if ($form_prof_transfert_id !== $form_id) {
return;
}
//$user_id = get_current_user_id();
$user_id = $post_array['ID'];
/*
* when transfert is validate, change card to valid
*
*/
if (is_transfert_success_CIPF($user_id)) {
set_account_valid_CIPF($user_id);
}
}
add_action('df_after_process', 'prof_after_form_transfert_validation_CIPF', 10, 3);
/*
* early checks on profil page
*
@@ -60,7 +93,7 @@ function prof_profil_redirects_CIPF() {
if (!is_author())
return;
// don't redirect if it is the divi builder mode
if (et_fb_is_enabled) {
if (et_fb_is_enabled()) {
return;
}