Skip to content

Instantly share code, notes, and snippets.

@lukecav
Created October 6, 2017 13:29
Show Gist options
  • Save lukecav/e46fb54d78a3fa8af9966fece27b85ab to your computer and use it in GitHub Desktop.
Save lukecav/e46fb54d78a3fa8af9966fece27b85ab to your computer and use it in GitHub Desktop.
Stop customer IP from being saved in orders in WooCommerce
add_filter( 'update_post_metadata', 'wc_customer_ip_delete', 10, 3 );
function wc_customer_ip_delete( $null, $id, $key ) {
if ( '_customer_ip_address' === $key )
return FALSE;
return $null;
}
@lukecav
Copy link
Author

lukecav commented Oct 6, 2017

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