Please Log in to join the conversation.
delliott wrote: I need to have CBSubs enforce memberships on a calendar year basis. My thought is perhaps I can achieve this via using a SQL Action Integration that fires upon activation or renewal of the membership.
I have this:
UPDATE `#__cbsubs_subscriptions`
SET `expiry_date` = if(month(now())<11, str_to_date(concat(year(now())+1,'-01-01'),'%Y-%m-%d'), str_to_date(concat(year(now())+2,'-01-01'),'%Y-%m-%d'))
WHERE `id` = [subscription_id];
Will this work? I know it produces the right date, but my concerns are can I modify the column expiry_date on the cbsubs_subscriptions table successfully at this point in the process or activation or renewal?
Please Log in to join the conversation.