Detect if requested page is PWA on server side
You’re not passing the actual querystring to remove_query_arg(). After some quick testing, I think your $location value is probably an empty string, and the location you’re attempting to redirect to is ?isPwa. The 2nd parameter to remove_query_arg() should be the $referer value. function addIsPwaQueryArg() { $referer = wp_get_referer(); if (strpos($referer, ‘isPwa’) !== false) { $location … Read more