# WooCommerce Integration

Integration of WooCommerce into LMS allows you to fully manage the course buying process. Once you choose to use WooCommerce all the payment processes will be controlled by the WooCommerce plugin.

To facilitate the management of the sale of courses, we have developed an integration of the MasterStudy LMS plugin with the WooCommerce plugin. Since the WooCommerce plugin has advanced functionality and many additional add-ons for the introduction of sales accounting, you will have the opportunity to expand the selling of courses as an eCommerce platform.

## WooCommerce Installation

To install the WooCommerce plugin navigate to **Plugins > Add New** page in your WordPress admin area. On the Search field, enter WooCommerce and among the suggested plugins **Install** the WooCommerce plugin and **Activate** it.

![](/files/-Mdk2drrAlGlqegt6yLj)

## WooCommerce Pages

To smoothly proceed with the purchase process make sure that the **Cart page**, **Checkout page**, and **My Account pages** are specified under the **WooCommerce > Settings > Advanced tab > Pages Setup** section.

{% hint style="info" %}
The WooCommerce plugin comes with the theme package. **The mentioned pages are normally created and set during the demo** installation.
{% endhint %}

![](/files/-Mdk2qet6oyI2LjCP6SS)

Do not worry if the pages are not created and set with the demo content installation. You can create and install them with one click. Go to Dashboard > WooCommerce > Status > Tools tab and find the  **Create default WooCommerce pages** section and click **Create pages** button. The plugin will automatically create and set all required pages:

![](/files/-Mdk3USqSbcVhqbGrt9P)

{% hint style="info" %}
The detailed information on how to configure the rest plugin settings please find on the [WooCommerce plugin documentation](https://docs.woocommerce.com/).
{% endhint %}

## WooCommerce Payments&#x20;

No transaction can or will take place unless the payment method is configured. Go to **WooCommerce > Settings > Payments tab** and adjust your needed payment method. The MasterStudy theme supports all the payment gateways that are integrated with the WooCommerce plugin.&#x20;

{% hint style="info" %}
&#x20;The payment process is controlled by WooCommerce itself and the selected payment method, neither Masterstudy theme nor LMS plugins are involved in this process.
{% endhint %}

![](/files/-Mdk3fswz_yacj34G7JF)

If there is no your wished payment gateway to use you can choose the WooCommerce payment extensions to enable the preferred payment method. All available payment extensions you can find on the [WooCommerce extensions store](https://woocommerce.com/product-category/woocommerce-extensions/payment-gateways/) or on other resources.&#x20;

{% hint style="info" %}
Some of the WooCommerce payment gateway extensions are paid and they are not included in the theme package, you need to purchase them separately.

More detailed information and guide about how to correctly set the WooCommerce Payment Gateways you can read on the [WooCommerce Payments Start Up Guide](https://docs.woocommerce.com/document/payments/) article provided by plugin authors.
{% endhint %}

## **Guest Checkout**

**To enroll a user on a course, the MasterStudy plugin needs to know which user to provide access to the course content to.** Hence, there should be a specific user in the WordPress system to be able to apply to the course. That's why the user that wished to purchase the courses needs to create(have)an account. **Therefore, it is important to correctly set the Guest Checkout option of the WooCommerce plugin.**

To configure the Guest Checkout navigate to the **Woocommerce** > **Settings, click the Accounts & Privacy tab,** in front of the **Guest Checkout** option **uncheck** the ***Allow customers to place orders without an account*** option. Also, enable the ***Allow customers to log in to an existing account during checkout option*** to allow previously registered users to make a purchase using their existing account:

![](/files/-Mdk3qSfyLPTibXjncsh)

Also, enable the ***Allow customers to create an account during checkout*** option so the user was able to create an account on the purchase process. However, remember to uncheck the **Allow customers to create an account on the "My Account" page option** as the users need to be registered on the website via the theme registration form.

![](/files/-Mdk3yYE4Sn-NEA09OP6)

## LMS Products

After installing and configuring the WooCommerce plugin settings **enable the WooCommerce Checkout** on the **STM LMS > STM LMS Settings > General** section. This connects the LMS courses with the WooCommerce checkout system.

![](/files/-Mdk44OQnNU_oDWVB6Oc)

Once the WooCommerce checkout is enabled and the WooCommerce plugin's settings are configured, on the **Products** page will appear three additional sections: **LMS Products, Enterprise LMS Products, and LMS Bundles fields**.

{% hint style="info" %}
The **Enterprise LMS Products** and **LMS Bundles pages** appear if the Group Courses and Course Bundle add-ons are enabled.
{% endhint %}

![](/files/-Mdk4CjnuXTqmFplQUEJ)

### LMS Products Synchronization

**The newly created courses** on the STM LMS > Courses section **will automatically appear as products** on the Products > LMS Products section.

{% hint style="info" %}
To display the existing LMS course on the Products > LMS Products section, this course should be visited by any user one time (admin user is also considered).
{% endhint %}

![](/files/-Mdk4_4P0ibjtvTqcdRQ)

{% hint style="info" %}
**The products** displayed on the **LMS Products, Enterprise LMS Products,** and **LMS Bundles** sections **do not appear** in the list of All products in the admin dashboard and on the Shop page. &#x20;
{% endhint %}

All the LMS Products will be synchronized with the related courses' settings. If you apply changes to the course settings from the **STM LMS > Courses**,  these changes also will appear on the appropriate course from the **Products > LMS Products** section.

{% hint style="danger" %}
**Important!!**&#x20;

**The courses that are located on the LMS Products, Enterprise LMS Products, and LMS Bundles fields are the MasterStudy LMS Online Courses. All the changes applied to these courses from the Products section will not be applied to the course. This online course options can be changed only under the STM LMS > Courses section**
{% endhint %}

## MasterStudy LMS Product type

As a product type for the LMS Product will be assigned the MasterStudy LMS Product type:

![](/files/-Mdk4k3e3-rRaDk5sc0z)

The products section for the MasterStudy LMS Product types is not recommended to change the course title price and sale price dates. To change these options, edit the related course. Also, you will be warned about this on the product backend page:

![](/files/-Mdk4rhKfPCn-g6htPQK)

By default, the catalog visibility will be hidden for the LMS Products, so these courses will not be displayed on the WooCommerce shop page.

![](/files/-Mdk4xp0LQeLpeqjHcua)

## **Purchase Process**

On the Course page, click the **Get Course** button:

![The screenshoot takent from the Masterstudy theme](/files/-Mdk54gO2Iv1Pzjid77J)

After selecting the payment option the **Go to Cart** button will appear. Click on the button to proceed with the purchase:

{% hint style="info" %}
This step can be skipped. That is, after clicking on the Get Course button, the user will be immediately redirected to the Checkout page. To disable this step go to STM LMS > STM LMS Setting > Course tab and turn on the **Redirect to Checkout after adding to Cart** option.
{% endhint %}

![The screenshoot takent from the Masterstudy theme](/files/-Mdk5DIRM5h1vfXuQ1qt)

You will be transferred to the **Cart page** with the product info displayed. Also, here purchases can be deleted (1) or applied coupon (2).  Click Proceed To Checkout button to continue.

![The screenshoot takent from the Masterstudy theme](/files/-Mdk5QE2FhjFCbUvDw5J)

On the Checkout Page fill the Billing details form, select the Payment Method, and click the Place Order button:

![The screenshoot takent from the Masterstudy theme](/files/-Mdk5Y4y9UzFwAOTyKri)

After ending the purchase process the purchase details will display on the Checkout Page:

![The screenshoot takent from the Masterstudy theme](/files/-Mdk5evhyeCoN8VZ3UhC)

The purchase requests will be located on the **WooCommerce > Order** section. Here you can manage order status (complete/cancel/refund and e.t.c) and see the order details:

![](/files/-Mdk5tXUl43LCxwuwmzJ)

The Student can see the purchases history and status on their account page, on the My Orders section:

![The screenshoot takent from the Masterstudy theme](/files/-Me9dwc0s7nOkqXuUK6I)

{% hint style="info" %}
The detailed information about order managing you can read on the [Managing Orders](https://docs.woocommerce.com/document/managing-orders/) article of WooCommerce documentation.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stylemixthemes.com/masterstudy-lms/~/changes/D1BUqzsdqYuUfTmFZIuo/woocommerce/woocommerce-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
