| 开发者 |
fernandot
ayudawp |
|---|---|
| 更新时间 | 2026年11月27日 01:20 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
terms_and_privacy.terms_and_privacy when that block requires a checkbox, or as terms_notice when it only shows the informational paragraph WooCommerce ships by default, so acceptance by conduct is never logged as explicit consent. An opt-in toggle adds a required checkbox of the plugin's own, validated server-side, for evidence that does not depend on browser-side validation. On by default.cf7_form_{ID}, one type per form. No snippets required. On by default; turn off in Settings if it does not apply.wpforms_form_{ID}, one type per form. Works with WPForms Lite and Pro. No snippets required. On by default; turn off in Settings if it does not apply.gravityforms_form_{ID}, one type per form. No snippets required. On by default; turn off in Settings if it does not apply.fluentforms_form_{ID}, one type per form. Works with Fluent Forms Lite and Pro. No snippets required. On by default; turn off in Settings if it does not apply.wp-comment-cookies-consent checkbox (introduced in WP 4.9.6) when the visitor opts in. Stored as comment_consent. On by default; turn off in Settings if your site uses Disqus, Jetpack or another third-party comments system. Note that this native checkbox is a cookie preference, not consent to store the commenter's data.comment_privacy. This is the Article 7.1 consent to processing the name and email a commenter hands over, as opposed to the cookie preference above. WooCommerce product reviews share the comment form, so they are covered by the same option. Off by default.user_register. Accounts created from the admin Users screen are never recorded. Off by default.wp_login and wp_register. Registration is on by default; login is off by default (a normal login form has no consent checkbox, so login only matters for re-consent flows). The "Remember me" checkbox is excluded by design (ePrivacy / cookie preference, not GDPR consent).wc_login and wc_register. Registration is on by default; login is off by default, like the WordPress rows above. An opt-in toggle can inject the consent checkbox into the WC register form, since WooCommerce does not ship one natively.[tccl_consent_box] shortcode and Gutenberg block: drop a self-contained consent checkbox in any page, post or widget area as a stand-alone block. Submission posts to a REST endpoint and writes a record. Always available.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
wp_postmeta bloat).Tools > Export Personal Data and Tools > Erase Personal Data both include consent records (erasure anonymises rather than deletes — the record itself is the lawful basis to keep it) and the cookie banner decisions of signed-in visitors (erasure deletes those, because the identifier is all that identifies them).MAJOR.MINOR-YYYY-MM-DD).delete_data_on_uninstall setting (off by default) — uninstalling does not destroy consent evidence unless you explicitly opt in.tccl_save_consent() function to log consents from anywhere.terms-conditions-consent-log text domain. Translations are managed through translate.wordpress.org.
/wp-content/plugins/terms-conditions-consent-log/ or install through Plugins > Add New.[tccl_consent_box] in any page or post.Yes. Records, Settings, CSV export, the PDF certificate and the Privacy Tools integration work on any WordPress site. The WooCommerce parts (checkout capture, order metabox, order list column, order email line) only load when WooCommerce is active.
Nothing to set up. With Complianz active, the Cookies tab under Users > Consent log fills up on its own: one sealed row per decision, with the categories accepted, the cookie policy version on screen and the law that applied. Check it in a private window: choose something in your banner and the row appears. Complianz, CookieYes and Moove today, other banners release by release. For any other, Settings > Cookie banner decisions has a custom source to switch on and feed from your own snippet.
Nothing to set up while CookieYes runs on its own. With its banner on, the Cookies tab gets one sealed row per decision: the categories accepted, the law that applied and a sealed copy of the banner seen. CookieYes keeps no banner version, so the plugin copies its texts, buttons and categories, and re-copies only when what the visitor reads changes. Not recorded yet: CookieYes connected to its web app (banner served from its servers) and its legacy version. Settings > Cookie banner connection says which case is yours.
Nothing to set up. With Moove's banner active, the Cookies tab gets one sealed row per decision: the categories accepted and a sealed copy of the banner the visitor saw.
Moove keeps no banner version, so the plugin copies its texts, buttons and categories, and re-copies only when what the visitor reads changes. Each new copy makes Moove ask every visitor again, so no consent outlives its text, also after a Moove update that changes the default texts your banner uses. Installing or updating this plugin asks nobody again. Purge your page cache after changing the banner. To turn it off: add_filter( 'tccl_moove_renew_consent', '__return_false' );
If you also run Moove's Premium Consent Log, it keeps receiving every decision, and its own consent renewal takes precedence.
One, tccl_cid, and only after a visitor decides something in your banner. Somebody who just reads your site is given nothing.
It holds a random identifier your server mints, scripts cannot read it, and it ties one visitor's decisions together. Declare it as strictly necessary in your cookie policy.
Declare it with the tccl_cookie_sources filter, then send each decision from the browser:
add_filter( 'tccl_cookie_sources', function ( $sources ) { $sources['my_banner'] = array( 'label' => 'My banner', 'active' => true, 'version' => '3', 'law' => 'optin' ); return $sources; } );
window.tcclCookieConsent.record( 'my_banner', { action: 'accept_all', categories: [ 'functional' ], raw: {}, user_action: 'yes' } );
action is accept_all, reject, custom or withdraw; your server signs the version and the law. If your banner fires one event per category, use queue( 'my_banner', fn ) to collapse them into one row. With no filter, tick "Let my own snippet record decisions" in Settings and use custom.
Settings > Cookie banner connection says which banner is running, whether a decision has ever arrived and when the last one did. If it runs and nothing arrives, it has probably changed its script: say so in the support forum and it gets an updated adapter.
The ones taken by someone signed in: they carry the user, so WordPress finds them from an email. Exporting returns them, erasing deletes them. A decision taken without signing in has no email and cannot be found from one. Act on those by identifier, in Users > Consent log > Cookies. Erasing deletes instead of anonymising, like the retention period: a scrubbed row would still point at the same browser and prove nothing.
That your site showed that version of that banner under that law, signed by your server, and that the row has not been touched since. Not that a named person clicked: a browser reports the decision, as in every cookie consent log, paid ones included. No row is written for a visitor who has decided nothing.
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 form ID is part of the consent_type (cf7_form_{ID}), so each form is filterable separately. The first email field is the subject email. No snippets, no functions.php edits.
Open Consent log > Settings > Integrations and tick "Log every WPForms submission that ticks a GDPR Agreement field". Then add a GDPR Agreement field (Fancy Fields → GDPR Agreement) and edit its label to the exact wording to record (e.g. "I have read and agree to the privacy policy."). The form ID is part of the consent_type (wpforms_form_{ID}). The first email field is the subject email, and the field label is the stored text. Works with WPForms Lite and Pro. No snippets, no functions.php edits.
Open Consent log > Settings > Integrations and tick "Log every Gravity Forms submission that ticks a Consent field". Then add a Consent field (Advanced Fields → Consent) and set its checkbox label to the exact wording to record (e.g. "I have read and agree to the privacy policy."). The form ID is part of the consent_type (gravityforms_form_{ID}). The first email field is the subject email, and the checkbox label is the stored text. No snippets, no functions.php edits.
Open Consent log > Settings > Integrations and tick "Log every Fluent Forms submission that ticks a GDPR Agreement or Terms & Conditions field". Then add one of those fields. The form ID is part of the consent_type (fluentforms_form_{ID}). The first email field is the subject email, and the field's agreement text is stored as the accepted text. Works with Fluent Forms Lite and Pro. No snippets, no functions.php edits. The Terms & Conditions field has a checkbox toggle, which is what makes it an act of consent. With it off, Fluent Forms shows plain text with no checkbox, so there is nothing to record.
Most often the form has no email field. Records are identified by the email in the form's first email field. Without one the submission is skipped on purpose: a record that cannot be attributed to anybody is not evidence. A logged-in person is recorded with their WordPress profile email, so forms behind a login need no email field. Public forms need one. Also check that the consent field is a real consent field of the form builder: an [acceptance] tag in Contact Form 7, a GDPR Agreement field in WPForms, a Consent field in Gravity Forms, or a GDPR Agreement or Terms & Conditions field in Fluent Forms. A plain checkbox or an HTML block with your terms in it is not detected.
It renders a consent checkbox and a submit button, with an optional email field for logged-out visitors, and records the consent through tccl_save_consent(). Use it in any page, post or widget area, e.g.:
[tccl_consent_box text="I have read and agree to the privacy policy." consent_type="newsletter_signup"]
It is also available as a Gutenberg block called "Consent box".
<form>, so you get two submit buttons and conflicting flows. Use the dedicated integration instead (the first four are built in; for the rest, hook tccl_save_consent() from the submission action, see the FAQ below).When a login or registration form has a ticked consent checkbox, the plugin writes a record: wp_login, wp_register, wc_login or wc_register. It listens to wp_login (wp-login.php and the WooCommerce My Account login), register_new_user and woocommerce_created_customer.
consent, gdpr, privacy, terms, acceptance, agreement, accept, rgpd, politica, privacidad or terminos. Other names go in Settings → Integrations → "Custom consent field names" (comma-separated, exact match).wp_register_newsletter_consent.terms_and_privacy.Not on its own, and on purpose: a social login ends in an OAuth callback with no form or ticked box.
To record an acceptance your social login plugin collected, enable "Also record sign-ups created by membership, course or custom registration forms" in Settings > Integrations and feed the detector with the tccl_consent_detection_payload filter:
add_filter( 'tccl_consent_detection_payload', function ( $payload, $context ) { if ( 'user_register' !== $context ) { return $payload; // Never touch the other flows. } // Read the acceptance wherever your social login plugin left it before // sending the visitor to the provider: a transient, a cookie, a session. if ( get_transient( 'my_social_consent' ) ) { $payload['privacy_consent'] = '1'; } return $payload; }, 10, 2 );
consent, privacy, terms, gdpr…) or be in "Custom consent field names".$payload must come back untouched for every other context, or it affects logins, comments and the rest of the request.tccl_save_consent() from your social login plugin's "after register" hook, as in the custom-form example below.Yes, by default, but only comments where the visitor ticks the native "Save my name, email, and website..." checkbox. You can opt out in Consent log > Settings > Integrations if your site uses Disqus, Jetpack Comments or another third-party system without that checkbox. That native checkbox only asks permission to leave a cookie: an ePrivacy preference, like "Remember me", not the GDPR Article 7.1 consent to processing the commenter's name and email. For that, use the option in the next FAQ.
Open Consent log > Settings > Integrations and tick "Add a required privacy checkbox to the comment form and record who accepts it". Then:
consent_type = comment_privacy, separate from the comment_consent cookie opt-in. Both can coexist on one comment.Only if you enable "Also record sign-ups created by membership, course or custom registration forms" in Consent log > Settings > Integrations.
The options above hook the events WordPress and WooCommerce fire on their own forms. Membership, LMS and custom registration plugins create the account through the generic user-creation path, which those options never see. This setting covers that path and stores consent_type = user_register. It still requires a ticked consent checkbox, and never records an account you create yourself from Users > Add New.
It is off by default because these forms vary: check the first record before relying on it.
Yes. Both checkouts are supported, and the Settings screen tells you what yours will record. WooCommerce validates the checkbox of its "Terms and Conditions" block in the browser only and never sends its value to the server, so no plugin can read it. What is recorded depends on the block:
terms_and_privacy, like the classic checkout.terms_notice.Because your Terms and Conditions block has no checkbox, as WooCommerce ships it. The customer saw a sentence saying that continuing implies acceptance and ticked nothing. Logging that as consent would record an act that never happened.
This is not a warning that your shop is non-compliant. Processing an order rests on performing the contract (GDPR Article 6.1.b), not on consent. Whether you also need an affirmative act depends on what you ask customers to agree to, and that is your call.
For the explicit tick, enable "Require checkbox" on that block, or turn on the injected checkbox in Settings. Existing terms_notice records keep that type: they are the accurate account of what those customers saw.
Only if you write your own wording into the Terms and Conditions block, as the Settings screen recommends when it detects this. WooCommerce builds the default wording in JavaScript, with translations in script files that PHP cannot read, so no plugin can fetch the exact sentence your visitor saw. This plugin reproduces it under its own text domain: the same string in English, but in other languages its own translation, which may differ word for word. Anything you type into the block is stored verbatim, in any language. The same applies to the injected checkbox, whose text comes from your own setting.
That setting, and the pre-checkout informational text next to it, only apply to the classic checkout. In the block checkout the wording lives in the Terms and Conditions block, which you edit on the checkout page. This is deliberate: records store what the block shows, because the log must prove what the customer read.
Yes, for records taken from now on. The plugin keeps a sealed copy of your legal pages each time they change, and each record points to the copies in force at that moment.
The page was rendered before the plugin was updated and is served from a page cache. Purge the cache and it will work again. The form carries a payload signed by the server with the exact text it shows, and only what that payload says is recorded. A form with no payload, or an altered one, is rejected.
You are looking at it in a preview, a draft or the editor, and you cannot publish posts.
Something is closing the WordPress REST API to anonymous visitors, usually a security plugin set to allow it only for logged-in users. The consent box posts to /wp-json/tccl/v1/consent, so that route has to stay public. Allow the tccl/v1 namespace in that plugin, or switch it to a mode that only blocks the routes you choose.
In a custom indexed table called wp_tccl_consents (with your site prefix). The sealed copies of your legal pages live in a second table, wp_tccl_snapshots. With WooCommerce active, each order also gets three meta entries (_tccl_terms_accepted, _tccl_terms_version, _tccl_recorded_at) so the order screen shows the summary without querying the table.
Edit the version field in Consent log > Settings, or check "Bump version on save". The plugin also bumps it if the checkbox text changed but the version field did not. Keep in mind:
1.1-2026-05-17). The plugin just compares strings, so a trailing space is a different version.Use Tools > Erase Personal Data. The plugin's eraser anonymises records linked to the requested email (it does not delete them, since the record is the lawful basis to keep the proof of consent). You can also anonymise filtered records from the Records tab.
Use Tools > Export Personal Data. The plugin's exporter returns every consent record linked to the requested email, and the documents in force when each one was given, with their text.
Only if you explicitly opt in. "Delete all data on uninstall" is off by default, so an accidental uninstall keeps your consent evidence.
To remove a few test rows (until the upcoming bulk-delete UI), use 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 table prefix. This is an escape hatch, not a day-to-day flow. For real subject requests, use Tools > Erase Personal Data (anonymises) instead.
Contact Form 7, WPForms, Gravity Forms and Fluent Forms need only their toggle in Settings > Integrations. For any other source, call the public tccl_save_consent() from that plugin's submission hook. Read the version from the setting (tccl_get_setting( 'consent_version', '1.0' )): a hardcoded one that differs from Settings flags every record "Outdated" forever.
add_action( 'the_submission_hook_of_your_form_plugin', function ( $submission ) { tccl_save_consent( array( 'email' => sanitize_email( $submission['email'] ), // however your plugin exposes the email 'consent_type' => 'my_custom_form', 'consent_version' => tccl_get_setting( 'consent_version', '1.0' ), 'consent_text' => 'I have read and agree to the privacy policy.', 'consent_value' => 1, ) ); } );
Common hooks: elementor_pro/forms/new_record, forminator_custom_form_after_submission, user_register. Adapt the callback signature and how you read the email and the acceptance to each plugin's arguments.
Yes, once you tell it which proxy to trust. By default it records REMOTE_ADDR, the address your server actually talked to, and ignores forwarded headers, which anyone can fake. Behind a proxy, that address is the proxy's.
In Consent log > Settings, list the proxy under "Reverse proxies you trust" (one IP or CIDR range per line, the proxy's own addresses) and pick the header it sets: X-Forwarded-For, CF-Connecting-IP, X-Real-IP or True-Client-IP. The header is only read on requests that come from a listed proxy. Private addresses in the chain count as hops of your own network and are skipped, so a visitor inside that private network can make their own record show an address of their choosing.
The plugin stores a SHA-256 hash of the exact accepted text with each record. On every read it compares it with a fresh one, and 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.
The plugin renders a one-page A4 view with a "Print / Save as PDF" button, and modern browsers (Chrome, Safari, Firefox, Edge) export it to a real PDF natively. No external library is bundled. The plugin does NOT store any PDFs on disk and does NOT create an uploads folder. The certificate is generated on demand as HTML. The Site Icon from Settings > General, if set, shows in the header, also on certificates of older records.
The plugin removes a subsite's two tables (wp_<id>_tccl_consents and wp_<id>_tccl_snapshots) when it is deleted. But deleting a site runs from the network admin, which loads only the plugins active network-wide or on the main site. If the plugin is not active there, the clean-up does not run: the tables stay, records included, with no screen to see them. Export the subsite's records (CSV in Users > Consent log) before deleting it, or activate the plugin network-wide.
Each page carries a context signed by the server with the banner version shown on it, and the record stores what that page showed. A page served from a page cache was generated before the change, so it keeps sending the old version until the cache is purged. That is correct evidence of what that visitor saw. Purge the page cache after changing the banner.
tccl_moove_renew_consent filter switches it off.?cky_preview=%74rue, could be recorded as a decision. It is now read the way CookieYes reads it.