Skip to content

Instantly share code, notes, and snippets.

@luiseduardobraschi
Created June 10, 2019 22:43
Show Gist options
  • Save luiseduardobraschi/a1e8e35859f3ec35eecdeeee23b3af85 to your computer and use it in GitHub Desktop.
Save luiseduardobraschi/a1e8e35859f3ec35eecdeeee23b3af85 to your computer and use it in GitHub Desktop.
[WooCommerce BR] Keep shipping fields from being fed with billing values:
<?php
function wcbr_disable_copy_shipping_from_billing_fields( $default, $input ){
if( 0 === stripos($input, 'shipping_') ){
$default = '';
}
return $default;
}
add_filter('woocommerce_checkout_get_value', 'wcbr_disable_copy_shipping_from_billing_fields', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment