Skip to content

Instantly share code, notes, and snippets.

@ideadude
Created July 13, 2020 23:31
Show Gist options
  • Save ideadude/663e79bc83024dfe726a00680bb2edd1 to your computer and use it in GitHub Desktop.
Save ideadude/663e79bc83024dfe726a00680bb2edd1 to your computer and use it in GitHub Desktop.
Remove CVV from the checkout page and don't require it.
<?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' );
@laurenhagan0306
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment