• Resolved darkallman

    (@darkallman)


    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 to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter darkallman

    (@darkallman)

    Ah, to disable the pixel, I have to return True, otherwise, false!
    Case closed!

    Thread Starter darkallman

    (@darkallman)

    Indeed confirmed and case closed… (forgot to mark as solved)

    Plugin Author PixelYourSite

    (@pixelyoursite)

    all good 🙂

    MirkoE

    (@mirkoe)

    @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

    (@darkallman)

    Sure, I use this plugin:
    https://nl.ww.wp.xz.cn/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.
    MirkoE

    (@mirkoe)

    Thank you

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

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