I’m after a few pointers on where WooCommerce stores certain items in WordPress’s database. I would like to sell some Moodle 2.5 based courses through WordPress using WooCommerce and have Moodle authenticate course access using data created by WooCommerce.
To authenticate using an external database from within Moodle 2.5 is simple. Using the stock Authentication plugin within Moodle allows you to point to an external database for authentication. You just need to match the user fields within the two databases. The fields that need to be matched are:
- Username field
- Password field
- Password format
Optional fields are (of course, not all pulled from WooCommerce but perhaps some?):
- First name
- Email address
- Web page
- ID Number
- Phone 1
- Phone 2
So question one, where does WooCommerce store user data that would be useful for authentication purposes?
Moodle’s stock enrolment plugin is similar to the above, it queries an external database to match product codes with course codes. Moodle then allows access only to those courses that the authenticated user has purchased.
The fields required for the enrolment plugin are:
- Course field
- User field
So question two, where does WooCommerce store each customer’s sales records so that I can map the data required by Moodle 2.5?
I’m new to WooCommerce but would love to get this working. It’s not a problem using products like Magento so I can’t imagine it would be too much trouble to set up in WordPress with WooCommerce.
Thanks in advance.
- The topic ‘Woocommerce and Moodle 2.5’ is closed to new replies.