WordPress.org

Ready to get started?Download WordPress

Forums

Cookie Control
Removing geoplugin (2 posts)

  1. handig
    Member
    Posted 1 year ago #

    Thanks for making this plugin.

    Would it be possible to remove geoplugin? I configured it for all countries and want to avoid the extra third party request.

    I tried to just remove the line but this breaks something.

    wp_enqueue_script('cookiecontrol_geo', 'http://www.geoplugin.net/javascript.gp', '', '', true);

    http://wordpress.org/extend/plugins/cookie-control/

  2. Ewout
    Member
    Posted 1 year ago #

    to remove geoplugin, do the following (in version 1.5 of the Cookie Control plugin)

    remove
    wp_enqueue_script('cookiecontrol_geo', 'http://www.geoplugin.net/javascript.gp', '', '', true);

    and replace
    cookieLawApplies:function(){if(this.countryHasCookieLaw()){return true}return false}

    with
    cookieLawApplies:function(){return true}

    not the most elegant method, but it works :o)
    note that this automatically enables cookie control for ALL countries (assuming that's what you want)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags