solution : edit file cookie-script.php and replace : line 418 to 449 .
replace that :
public function cookie_script_deactivation() {
wp_dequeue_script("cookie_script");
}
// Clean up DB after uninstalling plugin
public function cookie_script_uninstall() {
if (!current_user_can("activate_plugins")) {
return null;
}
delete_option("cookie_script_item_id");
delete_option("cookie_script_item_src");
delete_option("cookie_script_item_connection_type");
delete_option("cookie_script_location");
delete_option("cookie_script_location_in_element");
wp_dequeue_script("cookie_script");
wp_deregister_script("cookie_script");
}
}
new CookieScript();
// Make sure there is no cookie script in document while plugin is deactivated
register_deactivation_hook( __FILE__, array("CookieScript", "cookie_script_deactivation") );
// Clean up DB after uninstalling plugin
register_uninstall_hook( __FILE__, array("CookieScript", "cookie_script_uninstall") );
………………………………………………………………………
per that
public static function cookie_script_deactivation() {
wp_dequeue_script("cookie_script");
}
// Clean up DB after uninstalling plugin
public static function cookie_script_uninstall() {
if (!current_user_can("activate_plugins")) {
return null;
}
delete_option("cookie_script_item_id");
delete_option("cookie_script_item_src");
delete_option("cookie_script_item_connection_type");
delete_option("cookie_script_location");
delete_option("cookie_script_location_in_element");
wp_dequeue_script("cookie_script");
wp_deregister_script("cookie_script");
}
}
$new_instance = new CookieScript();
// Make sure there is no cookie script in document while plugin is deactivated
register_deactivation_hook( __FILE__, array($new_instance, "cookie_script_deactivation") );
// Clean up DB after uninstalling plugin
register_uninstall_hook( __FILE__, array($new_instance, "cookie_script_uninstall") );