This file contains hidden or 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 my_pmpro_show_discount_code($show) | |
| { | |
| if(!empty($_REQUEST['discount_code']) || !empty($discount_code) || !$pmpro_level->id == 6) | |
| $show = true; | |
| else | |
| $show = false; | |
| return $show; | |
| } | |
| add_filter("pmpro_show_discount_code", "my_pmpro_show_discount_code"); |
This file contains hidden or 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 | |
| /* | |
| Plugin Name: PMPro stop upgrade level | |
| Plugin URI: https://gist.github.com/strangerstudios/8620962 | |
| Description: Prevent students from upgrading to teacher level. | |
| Version: .4.2.1 | |
| Author: Stranger Studios | |
| Author URI: http://www.strangerstudios.com | |
| */ | |
| /* |