Linux 软件免费装
Banner图

Terms & Conditions Consent Log

开发者 fernandot
ayudawp
更新时间 2026年5月19日 01:22
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce wpforms contact-form-7 gdpr consent

下载

1.0.0 1.1.0 1.2.0 1.3.0

详情介绍:

Article 7.1 of the GDPR demands more than a boolean: the defensible consent record needs the timestamp, the IP, the user agent, the document version in force at that moment and the exact text the user was shown. Terms & Conditions Consent Log fills that gap for any acceptance checkbox on your site, with or without WooCommerce. Every accepted consent — at the WooCommerce checkout, in a Contact Form 7 form, in a WPForms form, in the WordPress comments form or in a stand-alone shortcode/block — writes a row to a dedicated indexed table, sealed with a SHA-256 hash of the accepted text so any later change is detectable. From a clean admin screen you can filter, search, export to CSV, integrate with the native WordPress Privacy Tools, and open a one-page printable A4 certificate per record (your browser saves it as PDF in one click). Works with or without WooCommerce The admin menu lives under Users → Consent log on every install, with or without WooCommerce. The WooCommerce-specific bits (checkout capture, order metabox, "Consent" column on the orders list, optional consent line in the order emails) load only when WooCommerce is active; everything else (Records, Settings, CSV export, PDF certificate, Privacy Tools integration) works the same way on any WordPress site. Five sources of consent For anything else (Gravity Forms, Fluent Forms, Elementor Forms, Forminator, custom flows), call tccl_save_consent() from the appropriate hook. Why a dedicated table Storing thousands of consent records in wp_postmeta is wasteful and slow. The plugin uses its own indexed table and exposes a public function (tccl_save_consent) that you can call from anywhere to log additional consents in the same place. Main features Translation ready All strings use the terms-conditions-consent-log text domain. Translations are managed through translate.wordpress.org.

安装:

  1. Upload the plugin folder to /wp-content/plugins/terms-conditions-consent-log/ or install through Plugins > Add New.
  2. Activate the plugin.
  3. Open the plugin admin page: Users > Consent log.
  4. In the Settings tab, the WordPress comments, Contact Form 7 and WPForms integrations are on by default to support GDPR Article 7.1 (proof of consent) — turn off any that do not apply to your site. You can also paste [tccl_consent_box] in any page or post.
  5. (Optional, WooCommerce only) Override the checkbox text or add a pre-checkout informational paragraph. Leave them empty to keep the WooCommerce native text.
  6. Every accepted consent from any of the enabled sources will be logged automatically from now on.

屏幕截图:

  • Settings tab with editable texts, version control, retention, email options and uninstall control.
  • Order metabox with consent summary, integrity badge and printable-certificate button.
  • Consent column on the orders list.
  • Printable A4 certificate ready to be saved as PDF from the browser.
  • Exported CSV file with filtered records (metadata header + nice column names).

升级注意事项:

1.3.0 New installs now enable the three Integrations toggles (WP comments, CF7, WPForms) by default for GDPR Article 7.1 compliance (proof of consent). Existing installs keep your saved preferences. You can disable any toggle from Settings → Integrations.

常见问题:

Can I use the plugin without WooCommerce?

Yes. Activate it on any WordPress site and the Records, Settings, CSV export, PDF certificate and Privacy Tools integration all work the same way. The WooCommerce-specific bits (checkout capture, order metabox, order list column, order email line) only load when WooCommerce is active.

How do I capture consents from Contact Form 7?

Open Consent log > Settings > Integrations and tick "Log every CF7 form submission that ticks an [acceptance] field". Then make sure your CF7 forms include an [acceptance] field, e.g.: [acceptance privacy] I have read and agree to the privacy policy. [/acceptance] The plugin uses the form ID as part of the consent_type (cf7_form_{ID}), so each form is filterable separately. The first email field of the form is used as the subject email. No snippets, no functions.php edits.

How do I capture consents from WPForms?

Open Consent log > Settings > Integrations and tick "Log every WPForms submission that ticks a GDPR Agreement field". Then add a GDPR Agreement field to your form from the WPForms builder (Fancy Fields → GDPR Agreement) and edit its label to the exact wording you want recorded (e.g. "I have read and agree to the privacy policy."). The plugin uses the form ID as part of the consent_type (wpforms_form_{ID}), so each form is filterable separately. The first email field of the form is used as the subject email, and the GDPR Agreement field label is what gets stored as the accepted text. Works with WPForms Lite and Pro. No snippets, no functions.php edits.

How does the [tccl_consent_box] shortcode work?

It renders a self-contained consent checkbox + submit button, with optional email field for visitors who are not logged in. Submission posts to a REST endpoint that records the consent through tccl_save_consent(). Drop it in any page, post or widget area as a stand-alone block, e.g.: [tccl_consent_box text="I have read and agree to the privacy policy." consent_type="newsletter_signup"] The same functionality is also available as a Gutenberg block called "Consent box". Important: the shortcode renders its own <form> with a submit button, so it should NOT be nested inside another form builder's form (Contact Form 7, WPForms, Gravity Forms, Fluent Forms, Elementor Forms, etc.). If you embed it inside another form you will end up with two submit buttons and conflicting submit flows. For form builders, use the dedicated integration (Contact Form 7 and WPForms are built in; for the rest, hook tccl_save_consent() from the relevant submission action — see the Gravity Forms / Fluent Forms FAQ below). Also: do NOT use this shortcode as a substitute for the cookie checkbox of a cookie/banner plugin (Complianz, CookieYes, Real Cookie Banner, etc.). The legal context is different — cookie banners cover ePrivacy/cookies, this consent log covers GDPR art. 7.1 specific consents to specific personal-data processing. Mixing them yields ambiguous evidence.

Are WordPress comment opt-ins logged automatically?

Yes, by default. Only comments where the visitor ticks the native "Save my name, email, and website..." checkbox are recorded. You can opt out in Consent log > Settings > Integrations if your site uses Disqus, Jetpack Comments or any other third-party comments system where the native checkbox is not rendered.

Does it work with the new WooCommerce Block Checkout?

Not yet. The classic checkout is fully supported. Block Checkout support is on the roadmap.

Where is the data stored?

In a custom indexed table called wp_tccl_consents (with your site prefix). When WooCommerce is active, each order also gets three meta entries (_tccl_terms_accepted, _tccl_terms_version, _tccl_recorded_at) so the order edit screen can show the summary without querying the table.

How do I bump the document version when I change my terms?

Edit the version field in Consent log > Settings, or simply check "Bump version on save". The plugin can also bump it automatically if it detects the checkbox text has changed but the version field has not. Three things to keep in mind:

  1. The version string in Settings must match the version label of your terms document character by character (e.g. 1.1-2026-05-17). It is a free-text identifier and the plugin just compares strings, so a trailing space or a different separator will be treated as a different version.
  2. Once you bump the version, every record stored under the previous version is automatically flagged as "Outdated" in the records list. This is on purpose — it is the GDPR audit trail showing which exact wording each subject accepted at that moment. "Outdated" is a feature, not a bug.
  3. Do NOT delete or "clean up" Outdated records. They are the legal proof of consent for the version that was in force when the subject accepted it. If the user retires the terms and a regulator later asks for evidence, those rows are what you show them.

How do I delete or anonymise data for a specific customer?

Use the WordPress native Tools > Erase Personal Data screen. The plugin registers an eraser that anonymises records linked to the requested email (it does not delete them, since the record itself is the lawful basis to keep the proof of consent). You can also anonymise filtered records from the Records tab.

How do I export a customer's consent history?

Use Tools > Export Personal Data. The plugin registers an exporter that returns every consent record linked to the requested email.

Will an uninstall destroy my data?

Only if you explicitly opt in. The setting "Delete all data on uninstall" is off by default. Even if you uninstall accidentally, your consent evidence will survive. If you need to clean up a handful of test rows you generated while configuring the plugin (and you do not yet have the upcoming bulk-delete UI), you can remove them with a direct SQL statement against the consent table, e.g.: DELETE FROM wp_tccl_consents WHERE id IN (1, 2, 3); Replace wp_ with your site's actual table prefix. This is an escape hatch for legitimate clean-up after a misconfigured form; it is not a recommended day-to-day flow — to handle real subject requests, use Tools > Erase Personal Data (anonymises) instead.

How do I capture consents from Gravity Forms, Fluent Forms or any other source?

Call the public tccl_save_consent() function from the relevant hook. Always read the document version from the plugin setting (tccl_get_setting( 'consent_version', '1.0' )) so all records line up with the current version in Settings — if you hardcode a date here that differs from the one in Settings, every record will be flagged as "Outdated" forever. Example for Gravity Forms: add_action( 'gform_after_submission', function ( $entry, $form ) { if ( ! empty( $entry['1.1'] ) ) { // ID of your consent checkbox in the entry. tccl_save_consent( array( 'email' => sanitize_email( $entry['2'] ?? '' ), 'consent_type' => 'gravity_form_' . absint( $form['id'] ), 'consent_version' => tccl_get_setting( 'consent_version', '1.0' ), 'consent_text' => 'I have read and agree to the privacy policy.', 'consent_value' => 1, ) ); } }, 10, 2 ); Same idea for fluentform/submission_inserted, user_register, forminator_custom_form_after_submission, elementor_pro/forms/new_record, etc. — adapt the callback signature to each plugin's documented arguments. WPForms and Contact Form 7 are captured automatically when their integration toggle is enabled in Settings → Integrations; no snippet is needed for those two.

Does the IP detection work behind Cloudflare or other reverse proxies?

The plugin reads REMOTE_ADDR only and does not trust forwarded headers, which can be spoofed without a verified proxy. If your hosting puts the proxy IP in REMOTE_ADDR instead of the real client IP, all entries will record the proxy IP. Most WordPress-friendly hostings pass the real IP correctly.

What does "Tamper-evident" mean here?

When a consent is written, the plugin computes a SHA-256 hash of the exact accepted text and stores it alongside the record. On every read, the stored hash is compared against a freshly computed one — any difference is reported as TAMPERED in the records list, the order metabox and the certificate view. This is a cryptographic integrity check, not an electronic signature.

Is the certificate a real PDF?

The plugin renders a one-page A4 view with print-optimised CSS and a "Print / Save as PDF" button. Modern browsers (Chrome, Safari, Firefox, Edge) export that view to a real PDF natively — same fidelity as a server-side library would produce, with the added benefit that it respects your site's language and fonts. No external library bundled, so the plugin stays small. To be clear: the plugin does NOT store any PDFs on disk and does NOT create an uploads folder of its own. The certificate is generated on demand as HTML each time you open it, and only becomes a PDF if you (or the customer) clicks "Print / Save as PDF" in the browser. There is nothing to clean up on the server. If the site has a Site Icon defined in Settings > General (the same option block themes and classic themes share), it is shown in the certificate header next to the site name — including on certificates of consents recorded before this version, since the icon is added at render time, not at storage time.

更新日志:

1.3.0