Skip to content

v3.4.135

Choose a tag to compare

@radialmonster radialmonster released this 16 Jul 23:08
· 27 commits to main since this release

Fix auto-complete permanently blocked by a fully-refunded digital item.

maybe_auto_complete_order() treated an empty entitlement list for a digital
line item as "not ready yet" and kept waiting. But create_entitlements()
intentionally never creates entitlement rows for an item once its effective
quantity (qty minus refunded qty) drops to 0 or below. If a digital item was
refunded to zero while the order was still "processing," that item could
never get entitlement rows, so the order would never auto-complete even
though every other digital item was fully delivered.

Fixed by skipping the entitlement check for any item whose effective
quantity is already <= 0, matching the same condition create_entitlements()
uses to decide there's nothing to create for it.