WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
German Law Problem: How to remove the saving of the IP A (4 posts)

  1. SimonSov
    Member
    Posted 1 year ago #

    Hi!

    First of all: i really like the woocommerce shop, must have been hard work to create this! i think woocommerce won the battle of the wordpress shops.

    My question is: how can i deactivate the saving of the users IP address? saving IPs is a big privacy problem in germany. It appears at checkout process in the class-wc-checkout.php file.

    I think it can be resolved with a little filter/hook/action BUT I have no clue about how it should look like! can you help me? :)

    http://wordpress.org/extend/plugins/woocommerce/

  2. royho
    Member
    Posted 1 year ago #

    Really? I must say that is a strange law. I don't think there are any hooks/filters you can use in this case for that. So depending on the law, I am not sure if this will work for you.

    Although there no hooks in the file that saves this meta info, there are hooks outside of it say after an order is complete. You can simply hook into one of those and then call a delete_post_meta() function to delete the meta info. However this means the IP has been saved in DB once then removed after. Not sure if this is consider ok by your law.

    If not, then you have to alter the core code to comment out the update_post_meta function line 585 of class-wc-checkout.php

  3. SimonSov
    Member
    Posted 1 year ago #

    Wow, I didn't expect such a fast response. nice.

    Yeah there are many german laws in e-commerce that make you probably laugh. The highlight of all laws is probably the new "button solution". There you have to change the complete layout of the checkout page. You also have to remove the colours of any elements (such as tooltips, or whatever) and highlight (only!) the order summary (the cart), you also have to change the order of the checkout page and other stuff. It's crazy.

    And the law with the IP address is the general data privacy protection law, where we have to avoid saving the IP addresses. It's allowed to anoynmize them by cutting the last bytes, but the original, unchanged IP address shall not be saved.

    I tried to make an Hook according to your suggestions:

    function removeIPFromCheckoutMeta() {
    update_post_meta( $order_id, __( 'Customer IP Address', 'woocommerce' ), " " );
    }
    add_action( 'woocommerce_checkout_update_order_meta', 'removeIPFromCheckoutMeta' );

    Not sure yet if it works? I'll try it later :)

    Thank you! You've been a big help, royho!

  4. royho
    Member
    Posted 1 year ago #

    I must be blind...I didn't see the hook there in that file...sorry! But yes your code there should work just fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.