Created
July 5, 2017 00:54
-
-
Save vovafeldman/0ad555b8cc9766ba386e8afc8f2d6f14 to your computer and use it in GitHub Desktop.
Freemius Software Licensing Examples
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 | |
// This IF block will be auto removed from the Free version. | |
if ( my_fs()->is__premium_only() ) { | |
// This IF will be executed only if the user in a trial mode or have a valid license. | |
if ( my_fs()->can_use_premium_code() ) { | |
// ... logic related to any paid plan ... | |
} | |
if ( my_fs()->is_plan('starter') ) { | |
// ... logic related to starter plan and higher plans ... | |
} else if ( my_fs()->is_plan('professional') ) { | |
// ... logic related to professional plan and higher plans ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment