-
Notifications
You must be signed in to change notification settings - Fork 3
feat: PLG-130 - add WP Consent API categories integration #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/2.6.2
Are you sure you want to change the base?
Conversation
- Fix initialization bug (axeptioSettings → axeptioWpConsentCategories) - Add 5 WP Consent API categories as virtual vendors - Update consent directly without Google Consent Mode dependency - Refactor categories data to single source of truth - Add WordPress favicon for consent categories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 12 files
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="assets/js/frontend/axeptio.js">
<violation number="1" location="assets/js/frontend/axeptio.js:12">
P2: The `wp_consent_change` CustomEvent is no longer dispatched after consent is updated. This event is part of the WP Consent API specification and other consent-aware WordPress plugins may depend on it to react to consent changes. Consider dispatching the event after setting consents.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| if ( typeof wp_set_consent === 'function' ) { | ||
| window.axeptioWpConsentCategories.forEach( ( category ) => { | ||
| wp_set_consent( category, 'deny' ); | ||
| } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The wp_consent_change CustomEvent is no longer dispatched after consent is updated. This event is part of the WP Consent API specification and other consent-aware WordPress plugins may depend on it to react to consent changes. Consider dispatching the event after setting consents.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At assets/js/frontend/axeptio.js, line 12:
<comment>The `wp_consent_change` CustomEvent is no longer dispatched after consent is updated. This event is part of the WP Consent API specification and other consent-aware WordPress plugins may depend on it to react to consent changes. Consider dispatching the event after setting consents.</comment>
<file context>
@@ -1,18 +1,17 @@
+if ( typeof wp_set_consent === 'function' ) {
+ window.axeptioWpConsentCategories.forEach( ( category ) => {
+ wp_set_consent( category, 'deny' );
+ } );
}
-let consentTypeEvent = new CustomEvent('wp_consent_type_defined');
</file context>
Summary by cubic
Integrates WP Consent API categories into the Axeptio widget and syncs consent directly via wp_set_consent. Removes the Google Consent Mode dependency and sets categories to deny on init.
New Features
Bug Fixes
Written for commit ff2e9b0. Summary will update automatically on new commits.