WordPress filter hook
wp_consent_cookie_prefix
Fired by 11 WordPress plugins, running on 3.4M+ sites between them.
“Filters the consent cookie prefix to integrate with the WordPress Consent API.”
How to use wp_consent_cookie_prefix
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wp_consent_cookie_prefix', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from Jetpack's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
11 plugins that fire wp_consent_cookie_prefix
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Jetpack3+ million installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )jetpack_vendor/automattic/woocommerce-analytics/src/class-consent-manager.php:81 -
WP Consent API300,000+ installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )inc/class-wp-consent-api-config.php:65 -
SureCookie80,000+ installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )inc/integrations/wp-consent-api/consent-handler.php:195 -
Smaily Connect2,000+ installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )includes/Support/MarketingConsent.php:66 -
BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor1,000+ installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )includes/brikpanel-consent.php:166 -
Accelerate30+ installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )inc/analytics/namespace.php:225 -
Rooster One10+ installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )includes/consent/class-aieo-consent.php:960 -
Oriva for WooCommerceFewer than 10 installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )includes/class-capture.php:64 -
Datoden Cookie ConsentFewer than 10 installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )includes/dt-consent-api-lib.php:14 -
Aopy for WooCommerceFewer than 10 installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )includes/class-cdm-consent.php:290 -
TrackdolphinFewer than 10 installs
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' )includes/class-td-consent.php:72
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.