Skip to content

Conversation

@Loubal70
Copy link
Collaborator

@Loubal70 Loubal70 commented Dec 18, 2025

  • 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

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

    • Add the five WP Consent API categories as virtual vendors with titles/descriptions and a WordPress favicon.
    • Update consent via wp_set_consent based on vendor choices (no Google Consent Mode required).
    • Load wp-consent-api and pass the category list to the frontend when the plugin is active.
  • Bug Fixes

    • Fix initialization variable (axeptioSettings → axeptioWpConsentCategories).

Written for commit ff2e9b0. Summary will update automatically on new commits.

- 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
Copy link

@cubic-dev-ai cubic-dev-ai bot left a 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' );
} );
Copy link

@cubic-dev-ai cubic-dev-ai bot Dec 18, 2025

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 === &#39;function&#39; ) {
+	window.axeptioWpConsentCategories.forEach( ( category ) =&gt; {
+		wp_set_consent( category, &#39;deny&#39; );
+	} );
 }
-let consentTypeEvent = new CustomEvent(&#39;wp_consent_type_defined&#39;);
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants