Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created September 26, 2017 09:13
Show Gist options
  • Save andrewlimaza/acfda289974d032290a23a946998ef77 to your computer and use it in GitHub Desktop.
Save andrewlimaza/acfda289974d032290a23a946998ef77 to your computer and use it in GitHub Desktop.
make shipping fields optional PMPro
<?php
// Add this function to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
function pmpro_hide_shipping_fields( $shipping_fields ) {
unset( $shipping_fields['sfirstname'] );
unset( $shipping_fields['slastname'] );
return $shipping_fields;
}
add_filter( 'pmproship_required_shipping_fields', 'pmpro_hide_shipping_fields' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment