Functions to integrate with woocommerce#2
Conversation
Create a user in chamilo when the order is complete. If the user already in chamilo, then just subscribe in course or session.
ywarnier
left a comment
There was a problem hiding this comment.
Logic looks good but the indentation can be much improved.
Do you want to do it or should I merge and fix manually?
There's also a change request on the language variable.
includes/chamilo-functions.php
Outdated
| 'official_code'=> $user_id, | ||
| 'password' => $password, // required, it's important to define the salt into an extra field param | ||
| 'encrypt_method' => $encryption, // required, check if the encrypt is the same than dokeos configuration | ||
| 'language' => 'brazilian', // optional |
There was a problem hiding this comment.
language shouldn't be a fixed value. Isn't there something we can use in WordPress to catch the current language?
There was a problem hiding this comment.
Yes @ywarnier , but not getting entire name of language, just the code.
$lang = get_bloginfo("language");
echo $lang;
// output fr-FR, pt-BR, ....
So for this function, maybe the 'language' just let empty to chamilo made of default language in chamilo platform.
Fix idents and let blank optional language to create user in chamilo
|
Create a user in chamilo when the order is complete. If the user already in chamilo, then just subscribe in course or session.