• Resolved nflh

    (@nflh)


    Hi,

    When someone fills in the affiliate registration form I want to redirect to a custom page (when affiliate is confirmed). How can I do this? I’ve already checked the codes, but I think I need some help with this. I also add this code:

    if( defined( ‘YITH_WCAF’ ) && ! function_exists( ‘yith_wcaf_change_become_an_affiliate_redirection’ ) ){
    function yith_wcaf_change_become_an_affiliate_redirection( $url ){
    return ‘YOUR CUSTOM URL HERE’;
    }
    add_filter( ‘yith_wcaf_become_an_affiliate_redirection’, ‘yith_wcaf_change_become_an_affiliate_redirection’ );
    }

    but this doesn’t work. It goes straight to the (same) confirmed page (/?nm=confirmed) with the text ”You have already affiliated with us. Thank you!” Affiliates will be confirmed/accept automaticly. I want them to automatically go to the Affiliates Dashboard after they sign up. I hope you can help me with this.

    Thanks!

    • This topic was modified 6 years ago by nflh.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    If you want to do it, please add the following code in the functions.php of your active theme:

    add_action( 'yith_wcaf_new_affiliate', 'yith_wcaf_new_affiliate_redirect1',99 );
    	function yith_wcaf_new_affiliate_redirect1($id) {
    		$url = 'https://yithemes.com/';
    		wp_redirect( $url);
    		die();
    	}

    Only you need to change the variable $url and add here the url you want to redirect.

    I hope it helps you.

    Have a good day.

    Thread Starter nflh

    (@nflh)

    Thank you so much! With this code the affiliates will not be confirmed. What can I change about the redirect code so that my affiliates will be confirmed?

    (Option: ”Auto enable affiliates on registration” is on)

    Thanks!

    Plugin Author YITHEMES

    (@yithemes)

    Hello there,

    Thanks for contacting us and I hope you’re doing well 🙂

    Unfortunately this option:

    (Option: ”Auto enable affiliates on registration” is on)

    Is not added in this version of affiliate. Seem that you are using the Premium version of the plugin, in this case, you will need to open a ticket from your account in our page. This forum is only for the free version from wordpress.org.

    Have a good day.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Redirect to custom url after confirm’ is closed to new replies.