Expiration data not set in table 'opigno_user_membership_exp' while buying a new course

rahuldolas123
Forums
Hi, I have opigno based site that I use to sell subscription to courses. I have opigno commerce app enabled and working. So, problem is - when a user buys a course, he is subscribed to group related to that group but no insertion is done in table 'opigno_user_membership_exp'. This table has date of expiration of user accounts. I noticed that function opigno_user_expiration_app_og_membership_insert correctly gets the value of $date1, but still there is no insertion of this value in database. Can anyone help?
Profile picture for user James Aparicio
James Aparicio

Hi rahuldalas123,

Hi rahuldalas123,

Inside the course, have you set the amount of time the membership expires?

If you dont set and expiration period (ex: 1y), nothing will happen for that specific course.

Best regards

rahuldolas123

hi James,

Hi James, The course expiration amount is correctly set to 1 year and it's value is calculated correctly as +1 year in $date1 variable. I think only problem is in insertion of data in 'opigno_user_membership_exp'.
rahuldolas123

I was thinking about using db

I was thinking about using db_insert at the end of 'opigno_user_membership_exp' to programmatically enter data in that table so that expiration date will be set. Any advice?
Profile picture for user James Aparicio
James Aparicio

Hi rohuldolas123,

Hi rohuldolas123,

Thank you for finding this issue, i will create a new release for the module and let you know once it is online.

Best regards