• Resolved Cristian Antohe

    (@sareiodata)


    Hi,

    Just a quick suggestion.

    The example on this page: https://complianz.io/whitelisting-inline-script/
    does not work.

    It should be

    
    /**
     * Compatibility with Complianz plugin blocking trp_data script
     */
    // Whitelisting inline script for Complianz
    add_filter ( 'cmplz_service_category',
        function( $class, $total_match, $found ) {
            if ( $found && false !== strpos( $total_match, 'trp-dynamic-translator-js-extra' ) ) {
                $class = 'functional'; // add cmplz-script for Marketing and cmplz-stats for Statistics
            }
            return $class;
        }, 10 , 3
    );

    The correct filter is cmplz_service_category, not class.

Viewing 1 replies (of 1 total)
  • Plugin Contributor jarnovos

    (@jarnovos)

    Hi @sareiodata,

    The article indeed contained an outdated filter, which has been updated.

    Please know that you can actually do this directly under Complianz -> Integrations -> Script Center -> Whitelist a script, no additional code required.

    In any case, thanks for letting us know. Let me know if you have any further questions!

    Kind regards, Jarno

Viewing 1 replies (of 1 total)
  • The topic ‘The example on how to exclude a script is not correct’ is closed to new replies.