Block Facebook for Woocommerce script before consent
-
Hi,
For other GDPR-plugins there seem to be a easy solution to block Facebook for Woocommerce loading the script before user has given their consent. Usually the solution is simple like:
`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’);
}
}`Is there one for CookieYes?
The topic ‘Block Facebook for Woocommerce script before consent’ is closed to new replies.