Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created January 6, 2020 12:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewlimaza/9f0842faf150048b0285f24d75e16eb0 to your computer and use it in GitHub Desktop.
Save andrewlimaza/9f0842faf150048b0285f24d75e16eb0 to your computer and use it in GitHub Desktop.
Remove shipping phone field from PMPro checkout
<?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