Instantly share code, notes, and snippets.

Embed
What would you like to do?
GravityView - Disable setting cookies on front-end of site
<?php
add_filter( 'gravityview_js_localization', 'gravityview_disable_frontend_cookies' );
/**
* Disable setting cookies for back links on the front-end of the site
*
* Requires GravityView 1.22.1
*
* @param array $js_localization Settings for JS, including cookie path
*
* @return array $js_localization, without cookie path
*/
function gravityview_disable_frontend_cookies( $js_localization ) {
unset( $js_localization['cookiepath'] );
return $js_localization;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment