-
Notifications
You must be signed in to change notification settings - Fork 9
Description
This is more of a request for comments.
Summary
I think we want the Open edX Courses products to behave similarly to virtual products (examples: mark as completed an order if it is the only product, don't send emails of "the store received the order", and other behaviors more related to physical products)
Antecedents
We have issue #116, which leads to PR #117. From that PR, we identified that we need to change more behaviors of the Open edX Courses product.
Proposal
Have a PR with the change that makes the Open edX course behave as a virtual product (make sure that the purchase flows work with this new approach), updated the doc, and have a brief ADR about this decision.
Quick implementation thought: when marking products as an Open edX course, force the option to mark the virtual product. Illustrative link: https://docs.openedx.org/projects/wordpress-ecommerce-plugin/en/latest/tutorials/configuration_to_automate_enrolls.html#create-an-open-edx-course-in-wordpress
Comparison
| Parameter | "Open edX Course" (as Simple Product) | "Open edX Course" (as Virtual and Downloadable Product) |
|---|---|---|
| Order Status after payment | Processing (default for simple items). |
Completed (default for digital items). |
| Emails | Sends Order Received email by default. |
Sends Order Completed email. Order Received email is skipped. |
| Inventory | Tracks inventory, requires manual disabling. | No inventory tracking by default. |
| Shipping | Shipping fields appear in checkout. | Shipping is automatically disabled in checkout. |
| User Flow | User receives an email that may suggest a physical item is shipping. | User experience is clean and consistent with a digital purchase. |
| API Failure (in our case) | Processing status acts as a visible error flag. |
Order goes to Completed despite API failure, requiring a custom error log and notification system. |
Consequences
- If we convert the Open edX courses into virtual products, it skips the "processing" change of status, and right now it's what we use to trigger the creation of the enrollment request (we should change that).
- It would be a nice-to-have feature to trigger some kind of alert if an enrollment request object fails from an order flow.
References
- About products in WooCommerce https://woocommerce.com/document/managing-products/#how-to-add-products-in-woocommerce
- Order status doc (read processing) https://woocommerce.com/document/managing-orders/order-statuses/#order-statuses-in-woocommerce
- About emails https://woocommerce.com/document/configuring-woocommerce-settings/emails/#email-notifications