Skip Navigation

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.

Author Posts
May 2, 2016 at 3:27 pm #873371

attiahA

Hello
i face a problem in this code

 /**
 *Redirect Non-logged in Users to Register Page when they click on Take this course button
 */
 
add_filter('wplms_take_course_button_html','custom_non_loggedin_user_redirect',10,2);
function custom_non_loggedin_user_redirect($html,$course_id){
  if(!is_user_logged_in()){
    $extra ='';     
    $register_page='/register';
    return '<a href="'.$register_page.'" class="course_button full button">'.apply_filters('wplms_take_this_course_button_label',__('TAKE THIS COURSE','vibe'),$course_id).apply_filters('wplms_course_button_extra',$extra,$course_id).'</a>'; 
  }
  return $html;
}

the register page not take the languages

i ask for this code modification to work

May 2, 2016 at 5:29 pm #873471

attiahA

Witing

May 2, 2016 at 5:34 pm #873477

attiahA

This is not solved
what is this shit
why you mark it as solved