Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Verify Cookies Consent Before Showing the Google Maps
function wpgmp_accept_cookies($is_allowed) {
// cookies-notice plugin integration -
if( function_exists('cn_cookies_accepted') ) {
$is_allowed = cn_cookies_accepted();
// cookies-consent plugin integration. You may change cookie name here according to your needs.
if( $_COOKIE['catAccCookies'] == 1 )
$is_allowed = true;
return $is_allowed;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment