WordPress filter hook
wp_consent_api_waitfor_consent_hook
Defined by WP Consent API and fired by 4 plugins in total, running on 3.3M+ sites between them.
How to use wp_consent_api_waitfor_consent_hook
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_api_waitfor_consent_hook', 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.
4 plugins that fire wp_consent_api_waitfor_consent_hook
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Jetpack3+ million installs
apply_filters( 'wp_consent_api_waitfor_consent_hook', false )jetpack_vendor/automattic/woocommerce-analytics/src/class-consent-manager.php:53 -
WP Consent API300,000+ installs
apply_filters( 'wp_consent_api_waitfor_consent_hook', false )inc/api-functions.php:52 -
FeedAgentX10+ installs
apply_filters( 'wp_consent_api_waitfor_consent_hook', false )includes/Measurement/Consent.php:51 -
Datoden Cookie ConsentFewer than 10 installs
apply_filters( 'wp_consent_api_waitfor_consent_hook', false )includes/dt-consent-api-lib.php:136
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.