Created
January 11, 2018 10:22
-
-
Save andrewlimaza/52cd07b5a61a51ad692ad6b92b5ffd48 to your computer and use it in GitHub Desktop.
Hide Recaptcha for Paid Memberships Pro Checkout for certain levels.
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 | |
| /** | |
| * Remove the Captcha field for particular membership level. | |
| * Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function remove_pmpro_recaptcha() { | |
| // Assume user is checking out for level 5. Change according to level you would like to hide the Recaptcha field. | |
| if( $_REQUEST['level'] == 5 ){ | |
| remove_action( "init", "pmpro_init_recaptcha", 20 ); | |
| } | |
| } | |
| add_action( "init", "remove_pmpro_recaptcha" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment