Configure your WordPress so that Purchases and Refunds Automatically Generate Enrollments#

At the end of this tutorial, you will have your WordPress fully configured to sell your Open edX courses automatically.

Index#

Requirements#

To follow this tutorial, you need WooCommerce installed, and your Open edX Commerce plugin must already be connected to your Open edX platform. If you still need to configure it, please complete the Quickstart before proceeding with this tutorial.

Create an Open edX Course in WordPress#

To create an Enrollment Request (for enrollment or unenrollment) when someone buys or refunds a course, we must create Open edX Course products in WordPress.

  1. In the sidebar of the WordPress admin dashboard, go to Products and then to Add New.

  2. Click the Open edX Course checkbox and fill in the information required.

    Add new Open edX Course product.

    Warning

    We recommend not to use the Downloadable check when you use the Open edX Course check to avoid problems creating the enrollment. For more information, visit Decisions: Fulfillment and Refund.

  3. Add more information in your product as a title, description and image.

  4. Save or update your changes.

Create a WooCommerce Order#

We should create an order and check if the integration is functioning correctly.

Creating an Order from your site#

  1. Got to your product page in your WordPress site

  2. Add your course to the cart.

  3. Proceed to checkout.

  4. Add the email of the user you want to enroll in the billing email address.

  5. Proceed to payment.

    Note

    You can see this process in the first 5 minutes of this video demo, in which we used Paypal Sandbox for testing purposes.

Creating an Order Manually#

  1. In the sidebar of the WordPress admin dashboard, go to WooCommerce, then to Orders, and Add New.

  2. Edit the billing information and add the email of the user you want to enroll in the billing email address.

  3. Select Add item(s), then Add product(s), and select the Open edX course you created.

  4. Create the order.

  5. Change the Status to Processing.

    Update the WooCommerce order.
  6. Update the order.

Expected Behavior#

  • Have a new entry in the Enrollment Requests with an order associated.

    View request from an order.
  • Have a course enrollment with the course and user in your Open edX platform.

    Course enrollment in your Open edX platform.

Next Steps#