Title: GDPR Filter
Last modified: May 22, 2018

---

# GDPR Filter

 *  Resolved [darkallman](https://wordpress.org/support/users/darkallman/)
 * (@darkallman)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-filter/)
 * How to use your new filter?
 * Is this the way?
 * `add_filter('pys_disable_by_gdpr', '__return_false');`
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgdpr-filter%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [darkallman](https://wordpress.org/support/users/darkallman/)
 * (@darkallman)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-filter/#post-10307053)
 * Ah, to disable the pixel, I have to return True, otherwise, false!
    Case closed!
 *  Thread Starter [darkallman](https://wordpress.org/support/users/darkallman/)
 * (@darkallman)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-filter/#post-10307642)
 * Indeed confirmed and case closed… (forgot to mark as solved)
 *  Plugin Author [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/)
 * (@pixelyoursite)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-filter/#post-10307908)
 * all good 🙂
 *  [MirkoE](https://wordpress.org/support/users/mirkoe/)
 * (@mirkoe)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-filter/#post-10320363)
 * [@darkallman](https://wordpress.org/support/users/darkallman/)
    I see you used
   the Avada-Theme for your site. Can you give me a hint on how you used the filter
   with your cookie banner? Looks like a custom implementation.
 * Thank you
 *  Thread Starter [darkallman](https://wordpress.org/support/users/darkallman/)
 * (@darkallman)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-filter/#post-10321468)
 * Sure, I use this plugin:
    [https://nl.wordpress.org/plugins/cookie-notice/](https://nl.wordpress.org/plugins/cookie-notice/)
 * I put this in function.php
 *     ```
       add_action( 'wp_enqueue_scripts', 'wc_cookie_consent' );
   
       function wc_cookie_consent () {
       	// DISABLE FB PIXEL
       	add_filter('pys_disable_by_gdpr', '__return_true');
       	if ( function_exists('cn_cookies_accepted') && cn_cookies_accepted() ) {
       		add_filter('pys_disable_by_gdpr', '__return_false');
       	}
       }
       ```
   
    -  This reply was modified 8 years ago by [darkallman](https://wordpress.org/support/users/darkallman/).
 *  [MirkoE](https://wordpress.org/support/users/mirkoe/)
 * (@mirkoe)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-filter/#post-10323140)
 * Thank you

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘GDPR Filter’ is closed to new replies.

 * ![](https://ps.w.org/pixelyoursite/assets/icon-256x256.jpg?rev=3178123)
 * [PixelYourSite - Your smart PIXEL (TAG) & API Manager](https://wordpress.org/plugins/pixelyoursite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pixelyoursite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pixelyoursite/)
 * [Active Topics](https://wordpress.org/support/plugin/pixelyoursite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pixelyoursite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pixelyoursite/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [MirkoE](https://wordpress.org/support/users/mirkoe/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/gdpr-filter/#post-10323140)
 * Status: resolved