Forum Replies Created

Viewing 1 replies (of 1 total)
  • I would like this option as well and wrote an adaptation to your code.
    This is easily solvable by adding an filter on the meta data in the save function in the file class-inbound-message.php on line 229

    I’ve changed

    update_post_meta( $post_id, '_meta', $this->meta);

    to

    update_post_meta( $post_id, '_meta', apply_filters('flamingo_message_meta', $this->meta));

    With that filter, users can create filters for the meta data. In case of the removal of the remote_ip data, a user can add this code in their theme or plugin

    `
    /**
    * Prevent storing sender IP address in Flamingo for GDPR compliance.
    *
    * @param Array $meta fields
    * @return Array
    */
    add_filter(‘flamingo_message_meta’, function($meta_fields) {
    unset($meta_fields[‘remote_ip’]);
    return $meta_fields;
    }, 10, 1);
    `

    I couldn’t find the plugin on GitHub and I don’t have experience with SVN. So see this as my pull request. Is it possible to add the filter to the plugin code?

Viewing 1 replies (of 1 total)