Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter giulia-DF

    (@didafactory)

    Hi @uncannyowl,

    please could you help me?
    I’ve just tried to use the same

    I’ve just tried to use the same code suggested in a recent post (changing my own domain), but it doesn’t work. If I’m not enrolled in a couse, I’m retirected to the account settings page.

    Thank you so much for your help,
    Giulia

    Plugin Author Uncanny Owl

    (@uncannyowl)

    Hi @didafactory,

    It does look like the same issue as you probably saw elsewhere. In recent WordPress versions, you will have trouble with redirects to external sites unless you explicitly allow redirects to other domains.

    One of our developers suggested you add this code to the functions.php file of your child theme on app.formadentis.com to allow the external redirect:

    add_filter( 'allowed_redirect_hosts', 'fdt_extend_allowed_domains_list' );
     
    function fdt_extend_allowed_domains_list( $hosts ){
    
    	$hosts[] = 'www.bleaching-academy.it';
     
    	return $hosts;
     
    }
    Thread Starter giulia-DF

    (@didafactory)

    Hi @uncannyowl ,

    thank you for your reply. Please could you tell my how to change the code if I have to allow redirects to several domains?

    Do I have to clone the $host[] for each domain?
    For example:

    $hosts[] = ‘www.bleaching-academy.it’;
    $hosts[] = ‘www.anotherdomain.it’;

    Thank you so much,
    Giulia

    Plugin Author Uncanny Owl

    (@uncannyowl)

    Yes, that’s correct; our developer confirmed that you should proceed just as you described. Let us know if you have any issues with it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not Enrolled Redirect not working’ is closed to new replies.