Skip to main content

WordPress & WooCommerce Integration

Deploy Consent Shield across WordPress sites, WooCommerce checkouts, Elementor layouts, and custom theme engines with zero plugin bloat and automatic pre-DOM script quarantine.

NO PLUGINS

Zero Plugin Overhead

Eliminates heavy PHP database queries and slow admin notices by running as a high-speed edge script.

WOOCOMMERCE

Checkout Guard

Guards billing address forms and payment gateways against California wiretap litigation firm scrapers.


Step 01: Theme functions.php Integrationโ€‹

Add the following PHP snippet to your active child theme's functions.php file to ensure Consent Shield loads as the highest-priority head script:

<?php
// Hook Consent Shield at priority 1 to ensure pre-DOM execution
add_action('wp_head', function() {
?>
<!-- Consent Shield Real-Time Defense Kernel -->
<script
src="https://consentshieldai.com/shield.js"
data-site-id="CS-LIVE-PROD"
data-gcm-v2="true"
data-cipa-protect="true"
async>
</script>
<?php
}, 1);

Step 02: WP Rocket & Caching Plugin Compatibilityโ€‹

If using WP Rocket, LiteSpeed Cache, or WP Super Cache, exclude shield.js from JavaScript deferral and minification to avoid delay in pre-DOM interception:

  1. Open WP Rocket Settings โ†’ File Optimization.
  2. Under Excluded JavaScript Files, add:
    https://consentshieldai.com/shield.js
  3. Save changes and clear cache.

Step 03: Elementor & Beaver Builder Custom Footersโ€‹

To add a "Do Not Sell or Share My Info" link to your Elementor footer template:

  1. Edit your Footer Template in Elementor.
  2. Insert a Button or Text Link widget.
  3. Set the Link URL to:
    javascript:window.ConsentShield.openPreferences();

Scan Your WordPress / WooCommerce Site

Detect third-party plugin pixel leaks and CIPA wiretap exposure on checkout and contact forms.