Created
May 12, 2019 08:52
-
-
Save vovafeldman/678d57ab0bacada7baaef1d66707640b to your computer and use it in GitHub Desktop.
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
<?php | |
function my_after_license_change( $change, $current_plan ) { | |
switch ( $change ) { | |
case 'activated': | |
// License activated. | |
break; | |
case 'cancelled': | |
// License cancelled. | |
break; | |
case 'changed': | |
// Plan changed. | |
break; | |
case 'downgrade': | |
// Plan downgraded to free. | |
break; | |
case 'expired': | |
// License expired. | |
break; | |
case 'trial_expired': | |
// Trial expired. | |
break; | |
case 'upgraded': | |
// Plan upgrade. | |
break; | |
} | |
} | |
my_fs()->add_action( 'after_license_change', 'my_after_license_change', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment