frumbert / wp2moodle-moodle

Moodle end of a Wordpress to Moodle Single Sign On auth plugin
28 stars 29 forks source link

wp2moodle woocomerce integration. #30

Closed gaurav12y closed 7 years ago

gaurav12y commented 7 years ago

Hi,

I have a multiple course on moodle and i want to sell from wordpress and read courses from moodle section, I have a question if user purchase a course from wordpress then how system get that particular course purchase buy user and how enrollment will work. Thanks

frumbert commented 7 years ago

This plugin allows a special download file to be attached to a woocommerce product. The process is documented here as well as here. It basically works by representing courses in WooCommerce as virtual digital download products, which the user adds to using the normal cart / purchase mechanism you have set up in WooCommerce. Then, when the user tries to download the digital purchase, a hook in this plugin intercepts the download request and repackages it as a wp2moodle link and uses that to open the Moodle site (as if the user had clicked the shortcode link).

image

Shortcodes are not used. You don't have to create pages and host links on them. The details of what course (or courses), group (or groups), cohort (or cohorts) and activity to open are details you put into a file that becomes the digital download product.