Last active
August 29, 2015 14:15
-
-
Save ThomasLeCoz/bb3421534604d41d8319 to your computer and use it in GitHub Desktop.
WooCommerce subscriptions hooks for LearnDash course access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __construct() { | |
[...] | |
add_action('cancelled_subscription', array($this, 'remove_course_access'), 10, 2); | |
add_action('subscription_put_on-hold', array($this, 'remove_course_access'), 10, 2); | |
add_action('subscription_expired', array($this, 'remove_course_access'), 10, 2); | |
add_action('activated_subscription', array($this, 'give_course_access'), 10, 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment