- WooCommerce Integration Installation
- Prerequisite Settings for WooCommerce
- WooCommerce Integration User Guide
- Setting up variation for products
- Setting Up Grouped Products
- WooCommerce Integration Checkout
- Video for WooCommerce Integration Setup
- WooCommerce Integration Hooks & Filters
- WooCommerce Integration Shortcodes
- WooCommerce Integration Templates
WooCommerce Integration Installation
NOTE: Make sure that your PHP is version 5.3 or greater.
- Upon purchasing the WooCommerce Integration Extension for Edwiser Bridge, an email containing the purchase receipt, download link, and license key will be sent to your registered email id. You can download the extension using the download link provided.
- Go to the ‘Plugins‘ menu from the dashboard.
- Click on the ‘Add New‘ button on this page.
- Now click on the ‘Upload Plugin‘ button and upload the WooCommerce Integration extension file that you downloaded in the first step.
- Click on ‘Install Now‘ button once you have located and uploaded the plugin.
- On successful installation click the ‘Activate Plugin‘ link to activate the plugin.
- Alternatively, you can unzip and upload the WooCommerce Integration plugin folder using the FTP application of your choice.
License Key Activation
- Once you have activated the plugin Go to Edwiser Bridge > Settings > “Licenses” tab which will be created under the settings of Edwiser Bridge.
- The following screen will be available. Enter the license key provided in the purchase email in the ‘License Key‘ field and click the ‘Activate License‘ button.
- Every license issued is a single site license. You cannot use it on more than one website simultaneously.
- If you need to migrate the plugin from your staging site to your live site you will have to first deactivate license key from the staging site and then use the same key on the live site.
Before Getting Started with the WooCommerce Moodle Integration
Following are a few WooCommerce settings you should take care of before getting started with the WooCommerce Moodle Integration for Edwiser Bridge.
1. Disable Guest Checkout
To disable the guest checkout option you will have to navigate to WooCommerce –> Settings –> Accounts & Privacy and uncheck the ‘Allow customers to place orders without an account‘ option.
It is important to uncheck this option as users should not be able to purchase a course without registering to the WordPress site. If users are allowed to checkout without registration to the WordPress website their Moodle account will not be created. This happens because the Moodle account creation is triggered during the registration process of the WordPress account
2. Enable Registration on the Checkout Page
To enable registration at the checkout page, you will have to navigate to WooCommerce –> Settings –> Accounts & Privacy from the back end. Here under the ‘Account creation’ menu you will have to check the ‘ Allow customers to create an account during checkout ‘ field provided.
3. Disable Automatic Password Generation
Automatic password generation should be disabled to allow the users to enter their own password. This password will then be used at the time of the Moodle account creation.
To disable the automatic password generation, you will have to navigate to WooCommerce –> Settings –> Accounts &Privacy from the back end. Here under the ‘Account Creation’ menu, you will have to uncheck the ‘When creating an account automatically generate an account password‘ field provided.
4. Make the Product ‘Virtual’ & ‘Downloadable’
The product (which is essentially a course as a Product) should be made virtual and downloadable.
To configure this setting, you will have to go to the course product page and check the ‘Virtual’ and ‘Downloadable’ fields in the ‘Product Data’ meta box.
Getting Started with WooCommerce Integration
To start selling synchronized courses using WooCommerce, products will have to be created for courses in the WooCommerce store. This creation of courses as WooCommerce products can be done in any of the following two ways.
- By synchronizing courses as products from the Edwiser Bridge settings page.
- By associating courses with products from the product page at the back end.
1. Synchronizing Courses as WooCommerce Products from Edwiser Bridge Settings Page
- Now that the plugin has been installed and the license key has been activated ‘WooCommerce Synchronization Options‘ will be made available to you in the Edwiser Bridge settings section.
- To access these settings you will have to go to Edwiser Bridge -> Settings -> Synchronization in the admin menu. Once here, you will be able to see the following settings once you click the ‘Products‘ link.
- If you check the ‘Create courses as products‘ field and click the ‘Start Synchronization‘ button, all courses synchronized from Moodle are created as WooCommerce products. The products are published privately and will not be available to the end users.
- If you check the ‘Update courses as products‘ field and click the ‘Start Synchronization‘ button, all courses that have been previously created as products will be updated.
- Additionally, the price type of the course is set to ‘Closed‘ and the link of the corresponding WooCommerce product for the course is added to the ‘Optional Link‘ field on the course page.
- On checking the ‘Publish Synchronized Products‘ field, the courses that are created as private products will be published on the website and will be available to the end users.
2. Associating Courses with Products from the WooCommerce Product Page
- To synchronize courses as products from the WooCommerce product page you will have to go to Products –> Add Product.
- On the product page, a meta box labeled ‘Product Options‘ has been provided. This meta box contains a ‘Courses‘ field. You can use this field to select the course that you want to associate with this product.
- The courses field in the metabox is a multiple select box which means multiple courses can be bundled together and be sold as a single product using the WooCommerce Integration plugin.
- Once the courses that have to be linked with a product have been selected and the necessary changes have been made to the product page it should be published.
Note: Courses in Edwiser Bridge tab should be published(not supposed to be in Draft) while you try to configure the courses as WooCommerce Products.
What is Single Product Variation?
Variable products the product type in WooCommerce that lets you to, set variations to a product along with stock, prices, image etc.
We have customized this feature specifically for Moodle users who want to sell their courses through Edwiser Bridge and its extension WooCommerce Integration by setting some variations to it.
Below are the steps to create those variations and selling your Moodle course through WordPress.
Setting Variations to a product,
- Go to Products > Go to Edit Product > Go to Product Data section,
- Here select the product type as “Variable Product”
2. Add Attributes to use for Variations,
- Click on “Add” button next to “Custom Product Attribute” drop down,
- This will result in custom settings box showing up below for adding “Attributes Specific to Product”
- There you can set the name of the Attribute, and set values to it.
- Make sure that you check “Visible on products page” & “Used for variations” checkboxes.
- Once done hit on “Save Attributes”
3. Add Variations,
- You will have to manually add variation to the product, by selecting “Add Variation” from the drop down.
- Select attributes to variation, Click on triangle icon to expand variation and to add the relevant details in it.
4. Adding course details to each Variations,
- Set each variation as “Virtual”, “Downloadable” & “Enabled”
- You can link a Moodle course to each variation.
- Bundling of more than one course to a variation can also be achieved.
- Once you have done that you could click on “Save Settings” and then Click on “Update Button” to set it live.
Setting Up Grouped Products
Grouped products are similar to bundled products just that in Grouped Products, a similar set of related products are added to the group and each of them are individually priced.
These individual products are referred to as Child Products in WooCommerce.
Adding a Grouped Product
- Go to Products > Add Product.
- Choose “Grouped Product” option from the Product Data column.
- Fill in the rest of the Product details and hit Publish.
A grouped product is a collection of Child products, so a child product needs to be added and linked to a group.
Adding a Child Product
- Go to Products > Add Product.
- Choose Simple Product from the dropdown.
- Go to the linked products tab.
- In the Grouping dropdown, select the Group you just created.
Redirect Users to My Courses from Thank You Page
Users can be redirected to their My Courses page after they purchase a course.
A user will be shown the Thank You Page upon payment completion and they can then be redirected to their list of purchased courses.
One Click Checkout
Users can have One Click Checkout from the single pages. The product will be directly added to their cart.
Unenroll Users from Course upon Refund
You can have users to be automatically un-enrolled from a course when they have requested for a refund.
This option is available from the Orders page where you process the refunds.
Hooks and Filters
Use this hook to execute custom code when a new product is created during synchronization from the settings page.
$wp_product_id: WooCmmerce Product Id generated for a course
Use this hook to execute custom code when a new product is updated during synchronization from the settings page.
$wp_course_id : Id of Moodle course created on WordPress
Use this hook to include information of courses associated with a product selectively in order status emails.
array: This contains order status such as, ‘wc-processing’,’wc-completed’,’wc-on-hold’
Using this shortcode you can display the courses associated with a particular product on any required page.
product_id: Id of product post type
Using this shortcode you can render single cart checkouts.
This template is used to display courses associated with a product on the single product page. The courses are displayed using the ‘bridge_woo_display_associated_courses’ shortcode. The template file ‘associated_courses_product_page.php’ can either be overridden in the ‘edwiserBridge/’ folder of your current theme or by using ‘eb_get_template’ & ‘eb_locate_template’ filters in a custom plugin.
This template can be used to include courses associated with a product in the order emails. The template file ‘associated_courses_order_email.php’ can either be overridden in the ‘edwiserBridge/emails’ folder of your current theme or by using ‘eb_get_template’ & ‘eb_locate_template’ filters in a custom plugin.
Latest Version updated on 19th July 2017
* Fix – Unable to disable the guest checkout option.
* Tweak – Updated Licensing code.
= 1.1.4 =
* Feature – Setting for Redirect users to My Courses Page from WooCommerce Thank You Page.
* Tweak – Updated Licensing code.
* Tweak – Compatibility with WooCommerce 3.0.0
= 1.1.3 =
* Feature – Redirect users to My Courses Page from WooCommerce Thank You Page.
* Feature – WooCommerce Grouped Product compatibility.
* Feature – Checkbox `Unenroll from purchased courses?` on dashboard order refund section.
* Feature – One click checkout.
* Feature – New shortcode `[bridge_woo_single_cart_checkout]` to render single cart checkout page.
* Tweak – Show confirmation warning while trashing courses.
* Tweak – Compatibility with major update of WooCommerce Subscriptions 2.0.0.
* Tweak – Show associated courses as link.
* Tweak – Licensing code.
* Fix – User not getting enrolled when they purchases variable product.
* Fix – Plugin not working for Simple and Variable Subscriptions.
* Fix – Translation ready.
* Fix – Trashed courses are still visible in dashboard product edit page courses dropdown and on single product pages.
* Fix – Courses does not save properly on dashboard product edit page.
* Fix – Courses to products synchronization not working properly.
= 1.1.2 =
* Feature – Single product variation.
* Feature – Added a hook to support “Bulk Purchase” Add-on.
= 1.1.1 =
* Fix – Fixed a bug that was conflicting with WooCommerce Subscriptions.
= 1.1 =
* Tweak – Refactored & optimized whole plugin codebase using tools like PHPCS & PHPMD.
* Tweak – WooCommerce Integration license key presented inside the “licenses” tab in Edwiser Bridge.
* Tweak – Plugin compatibility with PHP 5.2 and above
= 1.0.4 =
* Fix – The table creation issue in this update.
= 1.0.3 =
* Tweak – Sync Course categories as Product categories
* Tweak – Assign Product categories to respective Products as per courses & course categories.
= 1.0.2 =
* Tweak – Separate “Products” tab in Synchronization.
* Tweak – Virtual and Downloadable options enabled by default in product page.
= 1.0.1 =
* Plugin compatibility with PHP 5.2 and above.
= 1.0 =
* Plugin Launched