From 5ec8f9288d3507291543febe442dba656a9c0e7c Mon Sep 17 00:00:00 2001 From: Luka Date: Sun, 17 Nov 2024 19:23:01 +0100 Subject: [PATCH] fix: ensure membership cancellation persists Add missing flush of the entity manager after cancelling a membership. This ensures that changes to the member's subscription details are correctly saved to the database. --- src/Controller/Admin/MemberCrud.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controller/Admin/MemberCrud.php b/src/Controller/Admin/MemberCrud.php index d01ab10..43597ef 100644 --- a/src/Controller/Admin/MemberCrud.php +++ b/src/Controller/Admin/MemberCrud.php @@ -90,6 +90,7 @@ public function cancelMembership(AdminContext $adminContext, MollieApiClient $mo $subscription = $mollieApiClient->subscriptions->getFor($customer, $member->getMollieSubscriptionId()); $subscription->cancel(); $member->setMollieSubscriptionId(null); + $em = $this->getDoctrine()->getManager(); $em->flush(); return new Response('Membership cancelled succesfully'); }