Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions to integrate with woocommerce #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fabiowoj
Copy link
Contributor

Create a user in chamilo when the order is complete. If the user already in chamilo, then just subscribe in course or session.

Create a user in chamilo when the order is complete. If the user already in chamilo, then just subscribe in course or session.
Copy link
Member

@ywarnier ywarnier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

'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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

language shouldn't be a fixed value. Isn't there something we can use in WordPress to catch the current language?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@fabiowoj
Copy link
Contributor Author

Logic looks good but the indentation can be much improved.
Do you want to do it or should I merge and fix manually?
I fix, see if this is ok.

There's also a change request on the language variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants