Closed ErxrilOwl closed 1 year ago
Hi @ErxrilOwl
Request you to try below sample code, it worked fine for me.
$result = Subscription::update($sub_id,array(
"replaceAddonList" => true,
"addons" => array(array(
"id" => $newAddons,
"quantity" => 1,
),)
));
@cb-khushbubibay , still not working. For now, I just created a workaround where I fetch all the unbilled charges and compare which addons to remove, and re-add using the same function.
@ErxrilOwl It appears that there might be an issue with your code, as the provided sample code worked successfully for me. It effectively replaced all the previously added addons from the subscription, leaving only the most recent addons associated with the updated subscription. If you want a call over this issue you can raise this with our support team support@chargebee.com
Yes, I tried the same code as yours, still not working. Already raised to chargebee support, might be an account issue. Thanks
I'm trying to update the subscription for a customer in which I change the addons and completely replace the old one, but it seems to be not working. It just keeps adding the addons to the current list in chargebee.