fixed redirection preventing to edit in divi builder mode

This commit is contained in:
asus
2024-03-20 11:24:40 +01:00
parent 4eee697078
commit 58f287f00f
3 changed files with 15 additions and 0 deletions

View File

@@ -45,6 +45,10 @@ function payment_page_redirects_CIPF() {
$slug_paypal_page = PLGNTLS_class::SLUG_PAYPAL_PAGE;
$role_prof = PLGNTLS_class::ROLE_PROF;
// don't redirect if it is the divi builder mode
if (et_fb_is_enabled) {
return;
}
// check the slug
if (!is_page($slug_paypal_page)) {
return;

View File

@@ -18,6 +18,9 @@ if (!defined('ABSPATH')) {
function prof_after_form_CIPF($form_id, $post_array, $form_type) {
PLGNTLS_class::debug_infos();
$acf_account_state = PLGNTLS_class::ACF_ACCOUNT_STATE;
error_log('form_id: '.json_encode($form_id));
error_log('post_array: '.json_encode($post_array));
error_log('form_type: '.json_encode($form_type));
//$user_id = get_current_user_id();
$user_id = $post_array['ID'];
@@ -69,6 +72,10 @@ function prof_form_restrictions_CIPF(){
$slug_renew_card = PLGNTLS_class::SLUG_RENEW_CARD;
$role_prof = PLGNTLS_class::ROLE_PROF;
// don't redirect if it is the divi builder mode
if (et_fb_is_enabled) {
return;
}
if (!is_page($slug_renew_card)) {
return;
}

View File

@@ -59,6 +59,10 @@ function prof_profil_redirects_CIPF() {
// is an author page
if (!is_author())
return;
// don't redirect if it is the divi builder mode
if (et_fb_is_enabled) {
return;
}