# Installation and Settings

Integration of WooCommerce into **MasterStudy 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 **e-commerce platform.**

{% content-ref url="orders-managament" %}
[orders-managament](https://docs.stylemixthemes.com/masterstudy-theme-documentation/woocommerce/orders-managament)
{% endcontent-ref %}

## WooCommerce Installation

{% hint style="success" %}
The main use case of the WooCommerce with MS LMS is the **integration of hundreds of WooCommerce Payment Methods**. **The free** version of WooCommerce is **enough** to do it.&#x20;
{% endhint %}

{% stepper %}
{% step %}
To install the WooCommerce plugin, navigate to **WP Dashboard > Plugins > Add New**&#x20;

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FCdefpy5yaYcke2nTmUQ7%2Fimage.png?alt=media&#x26;token=1a792f44-a1d1-45d8-a55b-ad041562770f" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Search for the WooCommerce, and among the suggested plugins, i**nstall** the WooCommerce plugin and a**ctivate** it:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FouEm75bCRy9RavoaztN5%2Fimage.png?alt=media&#x26;token=a76c303e-4a69-4981-afbc-f854a9f42fdf" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="success" %}
After the activation, you can complete or skip the setup wizard of the WooCommerce according to your needs.
{% endhint %}

## Setup WooCommerce x MS LMS

Once you have both MasterStudy and WooCommerce plugins activated on your WordPress, you have to configure the following settings to let them function smoothly and without problems.

### WooCommerce Pages

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

{% hint style="info" %}
Pages will automatically come after the activation of the WooCommerce plugin and should already have been specified there.
{% endhint %}

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FV3T82rK6KLjiv8ZHkXUn%2Fimage.png?alt=media&#x26;token=cdc5be94-a3ae-4d48-a88a-aca309b2ff8b" alt=""><figcaption><p><strong>WooCommerce > Settings > Advanced tab > Page Setup</strong></p></figcaption></figure>

For some reason, if some core pages are missing, you can quickly regenerate them by following **WP Dashboard > WooCommerce > Status > Tools > Create Default WooComerce Pages** and Create Pages:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2Fm80D2k7KlkKcKqWAM2mr%2Fimage.png?alt=media&#x26;token=867ead53-4d38-437f-97c5-4354f7a30984" alt=""><figcaption><p> WP Dashboard > WooCommerce > Status > Tools > Create Default WooComerce Pages </p></figcaption></figure>

### WooCommerce Payments

**MasterStudy LMS** includes several popular native payment methods like PayPal and Stripe, which can be[ **checked here.** ](https://docs.stylemixthemes.com/masterstudy-theme-documentation/woocommerce/broken-reference)**However,** integrating the payment methods of WooCommerce is one of the main reasons why we are using it, as this plugin has been integrated with hundreds of payment methods globally.&#x20;

{% hint style="warning" %}
In the WooCommerce Ingtegration, **native payment methods of MasterStudy will not function**, and the checkout process is **fully controlled by WooCommerce.** MasterStudy will not be involved in this process.
{% endhint %}

***

Payment methods of WooCommerce can be managed by following **WP Admin > WooCommerce > Settings > Payments tab**:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FSU5UPxWHeItEwAYIDNmA%2Fimage.png?alt=media&#x26;token=cb4ab841-8ca5-41e6-8956-081c6f3d6daa" alt=""><figcaption><p> <strong>WP Admin > WooCommerce > Settings > Payments tab</strong></p></figcaption></figure>

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

{% hint style="warning" %}
Some of the WooCommerce payment gateway extensions are paid; you need to purchase them separately.

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

***

{% hint style="info" %}
In the **Offline Payment** and **Wire Transfer** options, when each order is placed, the admin should [**grant access** ](https://docs.stylemixthemes.com/masterstudy-theme-documentation/woocommerce/orders-managament)to the course to students **manually**. Automated payment methods like **PayPal or** **Stripe**, have been designed to change the order status ([grant access to the course](https://docs.stylemixthemes.com/masterstudy-theme-documentation/orders-managament#woocommerce-orders-management)) **automatically**.

***

However, we **highly recommend** checking **all of your payment methods** and order statuses **after each order** or **regularly.**
{% endhint %}

{% embed url="<https://woocommerce.com/document/woopayments/>" %}

### Enabling MasterStudy x WooCommerce Integration

After configuring the WooCommerce, you can enable the integration from MS LMS Settings.

{% stepper %}
{% step %}
Follow **WP Dashboard > MS LMS > Settings > General** and enable the **WooCommerce Checkout.** Save the settings:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FgpEo46bpLDv585QFTNYl%2Fimage.png?alt=media&#x26;token=b1ba39e4-c30b-4d8c-afd3-88e92c570053" alt=""><figcaption><p><strong>WP Dashboard > MS LMS > Settings > General</strong></p></figcaption></figure>
{% endstep %}

{% step %}
That's it. From now on, your courses will be sold via WooCommerce.
{% endstep %}
{% endstepper %}

### Guest Checkout

**To enroll a user in 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 who wishes to purchase the courses needs to create/have an account.&#x20;

{% hint style="warning" %}
Therefore, it is important to correctly set the **Guest Checkout** option of the WooCommerce plugin.
{% endhint %}

{% stepper %}
{% step %}
Follow **WP Dashboard > WooCommerce > Settings > Accounts & Privacy:**

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FbyTkAGS9G4kO3HatAgqm%2Fimage.png?alt=media&#x26;token=0a818691-a05e-4a48-b528-efb262b5d0a0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
On this page, do the following actions:

* :x: **Uncheck:** *Checkout > Enable guest checkout*
* :white\_check\_mark: **Check:**  *Checkout > Enable log-in during checkout*
* :white\_check\_mark: **Check:** *Account creation  > During checkout*
* :x: **Uncheck:** *Account creation > On "My account" page*

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FrYscDI6xeKa8QaPJr5WT%2Fimage.png?alt=media&#x26;token=57c504fa-c938-421d-a756-aeb642afa3e9" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now you can scroll down and save the changes:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FH9ZXBtVgRX4idOaa7FxB%2Fimage.png?alt=media&#x26;token=f09c39c3-cf91-4fe2-b22a-dbddc4378da0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now, you have to enable the Guest Checkout option from MS LMS settings as well. Follow **WP Dashboard > MS LMS > Settings > General**, enable the **Guest Checkout**, and save the changes:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FjPB4ZKVH0MniOg1CItRd%2Fimage.png?alt=media&#x26;token=648f646f-f6c6-4f5d-9368-7454b2034aab" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Display Courses on WooCommerce Shop Page

There is an option to display the courses on your platform on the WooCoommerce shop page. Displaying courses on the WooCommerce shop page increases visibility by showcasing them alongside other products, improving discoverability through search and filters. It enhances user experience with a familiar shopping layout and enables cross-selling by promoting courses with related items.

{% stepper %}
{% step %}
To enable it, follow **WP Dashboard > MS LSM > Settings > General > Display courses on the WooCommerce shop page** and **save the changes:**

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FMCUCgLOec6FlrHrxnwDj%2Fimage.png?alt=media&#x26;token=23647152-e772-4d88-8a51-9445fc0bdfc3" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**After that, you have to regenerate the** Product lookup tables in WooCommere. You can follow the link to go to the required WooCommerce setting:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FS4ucPL9yjPagVPby7UaC%2Fimage.png?alt=media&#x26;token=e8b008a4-0763-4eab-94ab-c2fb6055c650" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click on the **Regenerate** button:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2F8TxTrOjU42NmH2O9X3fx%2Fimage.png?alt=media&#x26;token=9ed6ebc3-5376-4f40-8036-46966f750972" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
It may take <5 mins to regerate the table. Try refreshing the page after some time. "Lookup tables are regenerating" message will disappear:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FSE63L04UVr40q9n40oGZ%2Fimage.png?alt=media&#x26;token=84157275-dec8-474a-b2d8-e19fb8ac8d5f" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Here is the result:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FGB7HOwSqhmotwVuBp7GI%2Fimage.png?alt=media&#x26;token=12b8dd5a-eb90-464c-a3ca-65927b0dafa4" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

On the shop page, once the students click on the **View Course** button, the system brings them to the **Single Course** Page:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FxFfjnrkbaVZjo1Pg3a5g%2Fimage.png?alt=media&#x26;token=9cf8eda4-b959-453f-b8ab-a57011ea706d" alt=""><figcaption></figcaption></figure>

## **HPOS Compatibility**

MasterStudy LMS is compatible with the High-Performance Order Storage (HPOS) feature of WooCommerce. This feature is enabled by default. You can customize this option by navigating to **WooCommerce > Settings > Advanced > Features tab > Order Data Storage > High-Performance Order Storage:**

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FJWnGCcAtueyFZbyaEHJ2%2Fimage.png?alt=media&#x26;token=3e89619f-c8b1-42d5-bd3c-6c0e28846466" alt=""><figcaption></figcaption></figure>

You can get more information about the **HPOS** feature of WooCommerce by following this manual:

{% embed url="<https://woocommerce.com/document/high-performance-order-storage/>" %}

## **Print Logo for WooCommerce**

On the Order Details Page, there is a special button to print the order details:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2Fm49kpv7d6oCXxeFKuiw6%2Fimage.png?alt=media&#x26;token=ff9dd2a3-963c-49ff-a296-3f80453faeff" alt=""><figcaption></figcaption></figure>

The system collects the order information and generates ready-to-print `.pdf` document:

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2F4BqrehcpkQ6pwq0JSr8r%2Fimage.png?alt=media&#x26;token=9ba66a5f-85dc-440e-97eb-e9ad0ce8bbe8" alt=""><figcaption></figcaption></figure>

The logo of your website for this document can be uploaded by following  **MS LMS > Settings > General > WooCommerce Logo Upload:**

<figure><img src="https://2021837383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDO9V_qgvV5cQdw04iz%2Fuploads%2FcXKrXQPW0UPDnlwjcBId%2Fimage.png?alt=media&#x26;token=dc94c565-45d9-465f-8f61-406a447f4ced" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Congratulations, you have successfully integrated MS LMS and WooCommerce :tada:
{% endhint %}
