Skip to content

feat: auto-complete orders for OpenedX courses & virtual products, suppressing duplicate emails #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amirnafees88
Copy link

Description

This PR updates the order processing flow to automatically mark orders containing OpenedX courses or regular virtual/downloadable products as Completed.
If an order contains physical products, it will remain in the Processing status until completed manually.

Additionally, this PR disables the Order Processing email for orders that are auto-marked as Completed (to avoid sending both "Processing" and "Completed" emails to the purchaser at the same time).

Reasoning for Email Change:
When an order is marked as Completed immediately (OpenedX courses or virtual products only), sending both the Processing and Completed emails creates unnecessary duplication for the purchaser. This PR ensures only the Completed email is sent in such cases.

Testing instructions

Single Item Combinations:

  • OpenedX Course — Order Status: Completed, Order Processing Email: Not Sent, Order Completed Email: Sent
  • Virtual — Order Status: Completed, Order Processing Email: Not Sent, Order Completed Email: Sent
  • Physical — Order Status: Processing, Order Processing Email: Sent

Two-Item Combinations:

  • OpenedX Course + Virtual — Order Status: Completed, Order Processing Email: Not Sent, Order Completed Email: Sent
  • OpenedX Course + Physical — Order Status: Processing, Order Processing Email: Sent
  • Virtual + Physical — Order Status: Processing, Order Processing Email: Sent

Three-Item Combination:

  • OpenedX Course + Virtual + Physical — Order Status: Processing, Order Processing Email: Sent

@muhammadali286
Copy link

@MaferMazu kindly review this PR, Thanks

@MaferMazu MaferMazu self-assigned this Aug 21, 2025
@MaferMazu MaferMazu self-requested a review August 21, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants