• Resolved nadine7486

    (@nadine7486)


    Hi,
    I use your great plugin for quite some time. I have Require Login set to On and Redirect to Login Page set to Off so the pop up is showing. The problem is that I use Ultimate Member and the Login Page is not the default wordpress my-account page so I have to hardcode it. This is not a good practice since I lost this change in every update.

    I was wondering if you could add a setting so plugin users could change the link to the login page.

    Thanks in advance,
    Konstantina

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author templateinvaders

    (@templateinvaders)

    Hi @nadine7486

    You don’t need to edit plugin sources to change login URL.
    The plugin has a filter that can be hooked from 3rd party code to change this URL.

    Below is an example of code that you can put to functions.php of your active theme:

    /**
     * Custom login page URL
     *
     * $param string $url Default My Account URL
     *
     * @param array $post POST data
     *
     * @return string
     */
    function tinvwl_custom_login_page( $url, $post ) {
    
    	$custom_url = 'CUSTOM URL'; // A custom login page URL as static string or use 3rd party plugin method to get it.
    
    	return add_query_arg( 'tinvwl_redirect', $post['redirect'], $custom_url );
    }
    
    add_filter( 'tinvwl_addtowishlist_login_page', 'tinvwl_custom_login_page', 10, 2 );

    It will allow you to make safe plugin updates!

    Kind regards,
    Konstantin.

    Thread Starter nadine7486

    (@nadine7486)

    wow you are proving why you are one of my favorite plugin developers! Great support once again and super fast response!

    Thanks a ton,
    Konstantina

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ability to change link for Redirect to Login Page’ is closed to new replies.