Add action hooks to handle the cases when a product/variation is deleted linked to an access plan are deleted and handle the cases when an access plan is not linked to any product/variation.
Added logic to delete enrollments on order permanent deletion, and unenroll/enroll students on order or subscription trashing/untrashing.
Fixed an issue that made users to be unenrolled from a course when a subscription, that was part of the same wc order of the course, was ‘cancelled’.
Made sure that user enrollment/unenrollment related to a subscription happened only on the subscription status changes and not on their parent order status changes.
Use gmdate() in favor of date() for timestamps recorded to logs.