Support » Plugin: GDPR Cookie Compliance (CCPA ready) » Remove ajax.php ?

  • Resolved Luca Eberhardt


    Good day,

    we would very much like to use the PlugIn for our site.
    We tried it on our mirrored site and a script unfortunately triggers the employee login to appear for everyone:

    /* <![CDATA[ */
    var moove_frontend_gdpr_scripts =.
    {“ajaxurl”:”\/wp-admin/admin-ajax. php”, “post_id”: “4833”, “plugin_dir”:”\/wp-content\/plugins\/gdpr-cookie-compliance”, “show_icons”: “all”, “is_page”:””, “strict_init”: “1”, “enabled_default”:{“third_party”:1, “advanced”: 0},”geo_location”:”false”,”force_reload”:”false”,”is_single”:””,”hide_save_btn”:”false”,”current_user”:”0″,”cookie_expiration”:”365″,”script_delay”:”2000″,”wp_lang”:”_en”};
    /* ]]> */


    var moove_frontend_gdpr_scripts

    Is there any way to remove the script and if so where?

    Best regards and thanks in advance!
    Luca Eberhardt

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


    Hi @izteberhardt,

    Thanks for using our plugins.

    Our plugin works with AJAX, you can disable the AJAX by adding the following code snippet to your functions.php

    add_action( 'gdpr_cc_prevent_ajax_script_inject', '__return_true' );

    The hook above doesn’t remove the ‘ajaxurl’ from moove_frontend_gdpr_scripts variable, but in this case you can remove safely by adding another filter to functions.php

    add_action( 'gdpr_extend_loc_data', 'my_gdpr_extend_loc_data', 20, 1 );
    function my_gdpr_extend_loc_data( $loc_data ) {
    	unset( $loc_data['ajaxurl'] );
    	return $loc_data;

    Hope this helps.


    Any specific reason why it is requiring ajax? It is multiplicating the number of requests that the clients do, on every page load, the client does an additional request to admin-ajax.php , even if you accept the banner

    I think other plugins use mostly javascript (including to handle cookies), to avoid showing the banner again, and all the banner settings are directly in the page content, then it avoids doing more requests

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.