This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This thread is resolved. Here is a description of the problem and solution.
Problem: Get URL of post in different language
Solution: Recommended *wpml_permalink* hook for this purpose, like the following example. It will return French URL of the post.
$url = get_the_permalink();
$wpml_permalink = apply_filters( 'wpml_permalink', $url , 'fr' );
Relevant Documentation: https://wpml.org/wpml-hook/wpml_permalink/