• Resolved chiarajolly

    (@chiarajolly)


    Hello, I saw that in each response to my contact form, also the user agent and “remote IP” are saved. I would like useless user data not to be saved, to follow the “privacy by default” principle.
    Is there any option for that?

    • This topic was modified 2 years, 9 months ago by chiarajolly.
    • This topic was modified 2 years, 9 months ago by chiarajolly.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    You can use the wpcf7_flamingo_inbound_message_parameters filter hook to do so. The user agent and remote IP address are in the meta property.

    Hello, I am also looking to prevent remote ip from being stored, thank you for the response above but can you tell me please where do I find the ‘wpcf7_flamingo_inbound_message_parameters’ ? And what should I do once I have found it?
    Thanks for any help.

    Hey @teajunky

    i run into the same issue. You need to append the filter in the solution above in code.

    Add this code snippet to the “functions.php” file of your theme located in “./wp-content/themes/YOUR_THEME”:

    // define the wpcf7_flamingo_inbound_message_parameters callback 
    function custom_wpcf7_flamingo_inbound_message_parameters( $args ){
        $args['meta']['remote_ip'] = '';
        $args['meta']['user_agent'] = '';
        return $args;
    } 
    
    //add the action 
    add_filter('wpcf7_flamingo_inbound_message_parameters', 'custom_wpcf7_flamingo_inbound_message_parameters', 10, 1);

    Be aware that your “functions.php” file will reset with every update of your theme if you’re not using a child theme.

    More information about child themes: https://developer.www.ads-software.com/themes/advanced-topics/child-themes/

    • This reply was modified 2 years, 4 months ago by r81d3r.

    Thanks very much @r81d3r, I’ve used a child theme and that works perfectly!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Prevent Flamingo from saving user agent and IP address’ is closed to new replies.