Skip to content

Instantly share code, notes, and snippets.

@kilbot
Created October 24, 2018 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kilbot/785a22da763951ed0630bde65486c35f to your computer and use it in GitHub Desktop.
Save kilbot/785a22da763951ed0630bde65486c35f to your computer and use it in GitHub Desktop.
Force GDPR consent for WooCommerce POS
<?php
// this goes in your theme functions.php file
function force_gdpr_consent_for_woocommerce_pos()
{
if (function_exists('is_pos') && is_pos()) {
$_POST['wpgdprc'] = true;
}
}
add_action('woocommerce_register_post', 'force_gdpr_consent_for_woocommerce_pos', 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment