borlabs

Disable Borlabs Cookie by URL

Feb 1st, 2021 (edited)
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. /** Add this to your functions.php of your child-theme. */
  2. add_action('after_setup_theme', function () {
  3.     if (class_exists('\BorlabsCookie\Cookie\Frontend\Frontend')) {
  4.         if (strpos($_SERVER['REQUEST_URI'], '/ml-api/') !== false) {
  5.             remove_action('init', [\BorlabsCookie\Cookie\Frontend\Frontend::getInstance(), 'init']);
  6.         }
  7.     }
  8. });
Add Comment
Please, Sign In to add comment