Created
January 9, 2014 15:29
-
-
Save glueckpress/8335883 to your computer and use it in GitHub Desktop.
Snippet to clear customer IP address when order is sent. #woocommerce #wordpress
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 | |
/** | |
* Snippet for deleting the customer IP address from WooCommerce orders. | |
* Important for Trusted Shops® certificates in Germany. | |
*/ | |
add_action( 'woocommerce_checkout_update_order_meta', 'mp1401091554', 1 ); | |
function mp1401091554( $order_id ) { | |
update_post_meta( | |
$order_id, | |
'_customer_ip_address', | |
0 | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This still works, thanks! 👍 I have a feeling this
mp1401091554
key can change in any future version of WooCommerce/WordPress though.