• Resolved Erik Molenaar

    (@erikmolenaar)


    Hi,

    Thanks for your awesome plugin!

    I would like to disable all cookie notifications via PHP under specific conditions. Do you have a filter available in your plugin (or something else) so I can disable all notifications, e.g. functionality of your plugin?

    if ( my_function_to_check_conditions() {
       add_filter ( 'gdpr_cookie_compliance', '__return_false' );
    }

    Looking forward to your reply. Thanks and keep rockin’ with this awesome plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    Hi @erikmolenaar,

    Thanks for using our plugins.

    The requested feature is part of our premium add-on, it’s called “Hide Cookie Banner”, allows you to hide the Cookie Notice Banner on selected pages.

    Hope this helps.

    Thread Starter Erik Molenaar

    (@erikmolenaar)

    Thanks for your reply, but selected pages is not what I am after.
    I want to do it via PHP under very specific conditions.

    I see you have added filters to the free version of your plugin, which is great for this purpose. Why not recommend these?

    If there is anyone out there who wants to do the same, look no further, here it is:

    add_filter ( 'catapult_cookie_content', '__return_false' );

    P.s. no hard feelings, I still highly recommend your premium version!

    Plugin Author Moove Agency

    (@mooveagency)

    Hi @erikmolenaar,

    The requested feature is not part of the plugin, you can hide notifications using the codesnippet below:

    /**
     * Overriding the default banner & modal HTML once the visitors saved preferences
     */
    add_action( 'gdpr_modal_base_module', 'gdpr_cc_remove_module_elements', 10, 1 ); 
    add_action( 'gdpr_infobar_base_module', 'gdpr_cc_remove_module_elements', 10, 1 );
    add_action( 'gdpr_branding_styles_module', 'gdpr_cc_remove_module_elements', 10, 1 );
    add_action( 'gdpr_floating_button_module', 'gdpr_cc_remove_module_elements', 10, 1 );
    
    function gdpr_cc_remove_module_elements( $modal_html ) {
    	if ( my_function_to_check_conditions() ) :
    	  return '';
    	endif;
    	return $modal_html;
    };
    

    You can find more info in the plugin Help section, under Hooks & Functions

    Hope this helps

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filter to disable all notifications?’ is closed to new replies.