Overview
WP Consent API describes itself as: “Simple Consent API to read and register the current consent category.”
It is active on 300,000+ WordPress sites and rated 5.0 out of 5 by 2 users on WordPress.org. Developers can extend it through 1 actions and 13 filters, listed below.
How to install WP Consent API
- Open the plugin installer. In your WordPress dashboard go to Plugins → Add New Plugin.
- Search for it. Type “WP Consent API” and pick the one by Rogier Lankhorst.
- Install and activate. Click Install Now, then Activate.
Install with a zip file or WP-CLI
Download the zip from the WordPress.org plugin page, then go to Plugins → Add New Plugin → Upload Plugin, choose the file and click Install Now. Or from the command line:
wp plugin install wp-consent-api --activateRequirements: WordPress 5.0+ · PHP 7.4+ · tested up to WordPress 7.1.4
Hooks & customisation
WP Consent API 2.1.0 fires 1 actions and 13 filters. Use them from your child theme or a snippets plugin to change how it behaves without editing its files.
// Filter in inc/api-functions.php
apply_filters( 'wp_consent_api_cookie_expiration', WP_Consent_API::$config->cookie_expiration_days() );
// Filter in inc/api-functions.php
apply_filters( "wp_consent_api_registered_{$plugin}", false );
// Action in inc/api-functions.php
do_action( 'wp_consent_api_status_change_service', $service, $consented );
// Filter in inc/api-functions.php
apply_filters( 'wp_consent_api_waitfor_consent_hook', false );
// Filter in inc/class-wp-consent-api-config.php
apply_filters( 'wp_consent_categories', … );
// Filter in inc/class-wp-consent-api-config.php
apply_filters( 'wp_consent_cookie_prefix', 'wp_consent' );Need WP Consent API customised?
Tell us what you want changed, added or fixed and we'll reply with an estimate.
WP EXPERTS is independent and not affiliated with Rogier Lankhorst. Plugin names and logos belong to their owners. Version, rating and install figures from WordPress.org, checked Nov 17, 2026.