• Hi there,

    We are using the UM plugin in combination with WPML. Everything is working fine, except the {password_reset_link}.

    Currently we’re using two languages, Dutch & German. When a user subscribes, they’ll need to fill in their own password.

    When a user signs up in Dutch, they’re getting a Dutch email, as expected. However the link from the {password_reset_link} is redirected to the German password reset page.

    Is there a solution to fix this? We’ve tried several things but can’t seem to get it to work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @michaelvsetten

    Did you try creating the email template with the translation in the WP Admin > Settings > Email?

    https://drive.google.com/file/d/1WJyZXGwEiu5NyG-Fhgh_PtKwQ-c4KjUM/view

    Regards,

    Thread Starter michaelvsetten

    (@michaelvsetten)

    Hi champ,

    Thanks for your response!

    Yes, we’ve created a translation for the e-mails.

    DE:
    <a href="{password_reset_link}">Lege ein Passwort fest</a>
    NL:
    <a href="{password_reset_link}">Stel je wachtwoord in</a>

    Is there a way to change the {password_reset_link} to a hardcoded URL? Maybe that’ll solve it. It appears the WPML can’t seem to handle the shortcode.

    Best,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @michaelvsetten

    Could you please try adding this code snippet to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code?

    add_filter("um_get_core_page_filter","um_092721_password_reset_translated",10, 3);
    function um_092721_password_reset_translated( $url, $slug, $updated ){
    
        if( 'password-reset' === $slug ){
    
             $url = remove_query_arg("lang", $url );
             $url = add_query_arg("lang", ICL_LANGUAGE_CODE, $url );
        }
        return $url;
    }

    The above code will add the lang parameter in the password reset URL.

    Regards,

    Thread Starter michaelvsetten

    (@michaelvsetten)

    Hi Champ,

    Thanks for the quick response. When I’m adding your snippet onto the functions, it adds the lang as an attribute, but the first part still goes to the German translation. See below:

    /de/passwort-festlegen/?lang=nl&act=reset_password&hash=QqbQNNrxDMzKojE51FG7&user_id=110

    The weird thing is, the first part needs to be in Dutch (as seen in the lang=nl). Is there any other solution?

    Best,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘UM – WPML – Create own password bug’ is closed to new replies.