From 5c9faf0776203ca67a04a6c6f719a8ef047bafc4 Mon Sep 17 00:00:00 2001 From: David Parker Date: Fri, 21 Oct 2022 09:37:09 -0400 Subject: [PATCH] Only cancel relevent level on sub cancellation --- webhook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webhook.php b/webhook.php index 73fc257..cb1a9e3 100644 --- a/webhook.php +++ b/webhook.php @@ -202,7 +202,7 @@ function pmpro_ccbill_RecurringCancel( $morder ) { global $pmpro_error; - $worked = pmpro_changeMembershipLevel( false, $morder->user->ID , 'inactive'); + $worked = pmpro_cancelMembershipLevel( $morder->membership_id, $morder->user_id, 'inactive' ); if( $worked === true ) { //send an email to the member