Created
August 6, 2015 01:30
-
-
Save strangerstudios/fc63e239a37f1dee673b to your computer and use it in GitHub Desktop.
Hide discount code field on the PMPro checkout page for free levels.
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 hide_discount_code_field_for_free_levels($show) | |
{ | |
global $pmpro_level; | |
if(function_exists('pmpro_isLevelFree') && pmpro_isLevelFree($pmpro_level)) | |
$show = false; | |
return $show; | |
} | |
add_filter('pmpro_show_discount_code', 'hide_discount_code_field_for_free_levels'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Hide “Discount Code” field on Membership Checkout for Free or Specified Levels"at Paid Memberships Pro here: https://www.paidmembershipspro.com/hide-discount-code-field-on-membership-checkout-for-free-levels/