Created
July 13, 2020 23:31
-
-
Save ideadude/663e79bc83024dfe726a00680bb2edd1 to your computer and use it in GitHub Desktop.
Remove CVV from the checkout page and don't require it.
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 | |
/** | |
* Remove CVV from the checkout page and don't require it. | |
*/ | |
// Removes the field from the checkout page. | |
function my_pmpro_show_cvv( $show ) { | |
return false; | |
} | |
add_filter( 'pmpro_show_cvv', 'my_pmpro_show_cvv' ); | |
// Removes CVV from the required fields array | |
function my_pmpro_required_billing_fields_unset_cvv( $fields ) { | |
unset( $fields['CVV'] ); | |
return $fields; | |
} | |
add_filter( 'pmpro_required_billing_fields', 'my_pmpro_required_billing_fields' ); |
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 "Remove the CVV Field From the Checkout and Billing Pages" at Paid Memberships Pro here: https://www.paidmembershipspro.com/remove-the-cvv-field-from-the-checkout-and-billing-pages/