v 0.3.10 admin can validate payment from front
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user