Hi @annoy,
The code snippet was created to disable the Facebook Pixel script if the Third-Party cookies are accepted by your visitors.
We just checked your site, and the third party cookies are not enabled in GDPR Cookie Compliance -> 3rd Party Cookies settings screen.
You can choose ONE of the following options
1. You can enable the 3rd party cookies and in the the “Head scripts” you can add the following script: <script></script>
otherwise the validation doesn’t allow to save and turn on this cookie category. If you choose this option, the code shouldn’t be updated in your functions.php and please ignore the second code snippet.
2. Alternatively, you can keep the implementation as it is, but the code snippet should be updated and insert the Facebook Pixel tracking code based on Strictly Necessary Cookies value:
add_filter('facebook_for_woocommerce_integration_pixel_enabled', 'gdpr_cookie_facebook_wc', 20);
function gdpr_cookie_facebook_wc() {
$enable_fb_wc = true;
if ( function_exists( 'gdpr_cookie_is_accepted' ) ) :
$enable_fb_wc = gdpr_cookie_is_accepted( 'strict' );
endif;
return $enable_fb_wc;
}
add_action( 'gdpr_force_reload', '__return_true' );
Hope this helps.