• Resolved rafael1391

    (@rafael1391)


    Every time I change the language of WordPress and Moodle to Brazilian Portuguese (pt_br) users are not created and enrolled in the Moodle course after purchasing the course via Woocommerce.

    I found a temporary solution by changing the plugin file “class-moowoodle-enrollment.php” line 146 from $user_data['lang'] = substr($b,0,2); to $user_data['lang'] = $b;

    But I think this is not ideal because when the plugin updates my change will be overwritten.

    By the way, great plugin, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello, @rafael1391.

    I solved this issue adding this code at the functions.php file in the theme folder.

    function moowoodle_force_set_language($user_data){
    	$user_data['lang']='pt_br';
    	return $user_data;
    }
    add_filter('moowoodle_moodle_users_data', 'moowoodle_force_set_language' );
    
    add_theme_support( 'responsive-embeds' );
    
    

    I found this solution somewhere on the internet I don’t remember where.
    I never give up ??

    Plugin Author Dualcube

    (@dualcube)

    Thanks for the update @valderes

    Our team will look into this in our next update, so we can share a solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Users are not created and enrolled in Moodle if language is not english’ is closed to new replies.