Consent management
Polski PRO extends the consent log of Polski (free) with a version number for each legal checkbox, a Consent Management tab in My Account where customers see their consent history, three admin REST routes for reading and exporting the log as JSON or CSV, and a WordPress personal data exporter and eraser. It is active whenever Polski PRO is active.
Consent versioning
Section titled "Consent versioning"Automatic change detection
Section titled "Automatic change detection"Every time Polski (free) registers its legal checkboxes (the polski/checkboxes/registered action), Polski PRO computes an MD5 hash of each checkbox label. When the hash differs from the stored one, the checkbox gets the next version number.
Versions are kept in the polski_pro_consent_versions option, one entry per checkbox ID:
| Field | Content |
|---|---|
hash |
MD5 of the label |
version |
Version number, starting at 1 |
label |
Label text of the current version |
updated_at |
Date of the change (GMT) |
Only the current version of each checkbox is stored. Older label texts are not kept, and the change is not linked to the admin who made it.
Versions in the log
Section titled "Versions in the log"Consent records themselves do not store a version. Wherever a version is shown (My Account), it is the current version of that checkbox. There is no re-consent prompt: changing a label does not ask customers to accept again.
My Account tab
Section titled "My Account tab"The plugin adds a Consent Management tab to My Account, right after Account details, at the polski-consents endpoint. It shows the heading "Your Consent History" and a table of the customer's newest 100 consent records:
| Column | Content |
|---|---|
| Checkbox | Checkbox description, or its label, or its ID if the checkbox no longer exists |
| Status | Accepted (green) or Declined (red) |
| Context | Where the consent was recorded |
| Date | Y-m-d H:i |
| Version | v plus the current version of the checkbox |
Customers cannot revoke a consent from this tab; it is read-only. Without records it shows "No consent records found." If the tab returns a 404, save Settings > Permalinks once.
REST API
Section titled "REST API"Three read-only routes, all requiring the manage_woocommerce capability. There is no audit trail screen in wp-admin.
Consents for one user or session
Section titled "Consents for one user or session"GET /wp-json/polski-pro/v1/consents?user_id={id}GET /wp-json/polski-pro/v1/consents?session_id={id}One of the two is required; without either the route answers 400 with "Provide user_id or session_id." A user lookup returns the newest 200 records, a session lookup returns that session's records. Each record has id, user_id, session_id, checkbox_id, context, consented and created_at. There is no event-type or date filter and no paging.
Export for one user
Section titled "Export for one user"GET /wp-json/polski-pro/v1/consents/export?user_id={id}GET /wp-json/polski-pro/v1/consents/export?user_id={id}&format=csvuser_id is required. Returns up to 1000 records. The default is JSON, wrapped with user_id, exported_at and records_count. Pass format=csv for a text/csv download named consents-{user_id}-{date}.csv with the columns checkbox_id, context, consented, ip_address, created_at, where consented reads yes or no. Any other value falls back to JSON.
Before PRO 1.26.3 the format argument was declared and ignored, so a request for CSV received JSON with no error.
Consent versions
Section titled "Consent versions"GET /wp-json/polski-pro/v1/consents/versionsReturns the stored version map. Takes no arguments.
There is no /consents/audit route, and no route accepts consent_id, event_type, date_from, date_to or per_page.
The free plugin has a screen for cookie banner decisions, at Polski > Reports and Tools > Consent records, available while its Consent Manager module is on.
WordPress privacy tools
Section titled "WordPress privacy tools"Personal data export
Section titled "Personal data export"Polski PRO registers an exporter named Polski Consent Records (polski-consents) in Tools > Export Personal Data. For a registered user with that email it adds up to 500 records to the export, in the group "Legal Consents", each with checkbox ID, context, consented (Yes/No) and date. IP addresses are not included in this export.
Personal data erasure
Section titled "Personal data erasure"It also registers an eraser with the same name in Tools > Erase Personal Data. Erasure deletes all consent log rows of that user from the {prefix}polski_consent_log table; nothing is anonymised and kept. Records of guest checkouts (no user account) are not found by email and stay in the table.
Stored data
Section titled "Stored data"The consent log is the table of Polski (free), {prefix}polski_consent_log. IP addresses are stored anonymised with WordPress wp_privacy_anonymize_ip() (last IPv4 octet zeroed), and the user agent is cut to 500 characters.
The consent module registers no actions or filters of its own. Read the log through the routes above, or through ConsentLogRepository directly. For GDPR requests use the WordPress exporter and eraser described above.
Common issues
Section titled "Common issues"GDPR export does not contain consent data
Section titled "GDPR export does not contain consent data"- Check that Polski Consent Records is listed as an exporter in Tools > Export Personal Data
- Check that the email belongs to a WordPress user; guest records are not matched
- Check the PHP error log
The version number does not change after editing a checkbox
Section titled "The version number does not change after editing a checkbox"The version changes only when the label text changes. Editing only the description does not change the hash.
Can a customer withdraw a consent in My Account?
Section titled "Can a customer withdraw a consent in My Account?"No. The Consent Management tab only lists the customer's consent history.
Are customers asked to accept again after I change a checkbox label?
Section titled "Are customers asked to accept again after I change a checkbox label?"No. The label change gives the checkbox a new version number, but no prompt is shown at checkout or in My Account.
Can I export one customer's consents as CSV?
Section titled "Can I export one customer's consents as CSV?"Yes. Call GET /wp-json/polski-pro/v1/consents/export?user_id={id}&format=csv as a user with manage_woocommerce.
What does erasing personal data remove?
Section titled "What does erasing personal data remove?"All consent log rows linked to that user account. They are deleted, not anonymised.