Skip to content

Partial refunds unenroll users from all Moodle courses in the order #166

@moumitahalder

Description

@moumitahalder

Description

We are receiving reports that partial refunds in WooCommerce are causing users to be unenrolled from all Moodle courses linked to the order, instead of only the refunded item.

This appears to be related to the “Unenroll user after refund” feature.

Expected Behavior

Partial refunds should only affect the refunded course/product

Enrollments for other non-refunded courses in the same order should remain active

Actual Behavior

When a partial refund is processed, the user is unenrolled from all Moodle courses associated with the order

Examples

  • Example 1

Order contains 3 courses: EILWI26, ILWI26, TLWI26

One course is partially refunded

Result: User is unenrolled from all 3 courses

  • Example 2

Order contains 2 courses (EILWI26, TLWI26) + a paid PDF textbook

Partial refund issued only for the textbook

Result: User is unenrolled from both courses

Impact

Users lose access to valid courses after unrelated partial refunds

Causes confusion and support issues for clients

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions