Halloween Sale 15% off Ends in See the plans

Snippet Library

Privacy & Cookies snippets for WordPress

Snippets for privacy and cookies: load tracking only after consent, remove IP addresses, tidy personal data and add privacy notices. For site owners working toward GDPR and similar privacy rules.

1–3 of 3 snippets “table”

  • PHP Privacy & Cookies

    Records each cookie consent choice (accepted or rejected, categories, date and privacy policy version) in its own database table, with only a shortened IP address, and lists the latest records under Tools > Consent Log.

  • PHP Privacy & Cookies

    Adds a [cookie_list] shortcode that prints a clear table of the cookies your site uses, with provider, purpose and duration, for your cookie or privacy policy page.

  • PHP Privacy & Cookies

    Shorter WooCommerce Guest Sessions

    Makes WooCommerce forget guest shopping sessions (cart contents and entered details) after 24 hours instead of two days, so less customer data sits in the sessions table.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.