We spoke with @alainmelsens via our support channel, but wanted to circle back here on the resolution in case others needed it:
add_filter( ‘redirect_after_gdprf_submit’,’modify_fiter’);
function modify_fiter($value){
$ptool_page = get_option(‘gdpr_tools_page’);
if (isset($GLOBALS[“polylang”]))
{ $translations = $GLOBALS[“polylang”]->model->post->get_translations($ptool_page); }
$current_language = pll_current_language();
$default_language = pll_default_language();
$id_ctools = $translations[$current_language];
$modified_URL = get_site_url().’/’.$current_language.’/’.get_post_field( ‘post_name’, $id_ctools ); return $modified_URL;
}
add_filter( ‘privacy_tools_gdprf_page_url’,’modify_fiter_url’);
function modify_fiter_url($value){
$ptool_page = get_option(‘gdpr_tools_page’);
if (isset($GLOBALS[“polylang”]))
{ $translations = $GLOBALS[“polylang”]->model->post->get_translations($ptool_page); }
$current_language = pll_current_language();
$default_language = pll_default_language();
$id_ctools = $translations[$current_language];
$modified_URL = get_site_url().’/’.$current_language.’/’.get_post_field( ‘post_name’, $id_ctools ); return $modified_URL;
}
————————————————————–
Now everything is working as expected, even for the default language.
And thanks for the shoutout @alainmelsens :
“Now, you may also confirm that your “The GDPR Framework” WordPress plugin is compatible with Polylang and also works with multilanguage websites. I guess this is very unique at this moment! I have tested many GDPR plugins but in fact, your “The GDPR Framework” is the only one who is GPDR compliant because it’s gives the real WORKING procedures to give the website user what he needs following the real GDPR law rules.
Trully, it’s amazing what you give us to be GDPR compliance. I appreciate it very much.”
We appreciate your feedback and comments!