Created
January 6, 2020 12:11
-
-
Save andrewlimaza/9f0842faf150048b0285f24d75e16eb0 to your computer and use it in GitHub Desktop.
Remove shipping phone field from PMPro checkout
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 | |
/** | |
* Make phone field optional for shipping details. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function pmpro_remove_phone_shipping( $fields ) { | |
unset( $fields['sphone'] ); | |
return $fields; | |
} | |
add_filter( 'pmproship_required_shipping_fields', 'pmpro_remove_phone_shipping', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment