WPLP Cookie Consent icon
Analytics & Tracking

WPLP Cookie Consent hooks reference

  • By WP Legal Pages
  • v4.5.0
  • Updated

WPLP Cookie Consent 4.5.0 has 36 actions and 53 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when WPLP Cookie Consent fires an action
add_action( 'gdpr_cookie_font', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value WPLP Cookie Consent is about to use
add_filter( 'gdprcookieconsent_block_rules', function( $rules ) {
	// Change $rules here.
	return $rules;
}, 10, 1 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • public/modules/script-blocker/class-wpl-cookie-consent-script-blocker.php line 236
    /**
     * Filters the script blocker rules.
     */
    apply_filters( 'gdprcookieconsent_block_rules', $rules );
  • public/modules/script-blocker/class-wpl-cookie-consent-script-blocker.php line 185
    /**
     * Category for a match whose own category is unknown.
     */
    apply_filters( 'gdprcookieconsent_default_block_category', 'unclassified' );
  • public/class-gdpr-cookie-consent-public.php line 231
    /**
     * Keep writing the pre-4.5 consent cookies from the new record, for cached
     * pages still running the old script and for rollbacks.
     */
    apply_filters( 'gdprcookieconsent_mirror_legacy_cookies', true );
  • public/class-gdpr-cookie-consent-public.php line 206
    /**
     * Categories a US-law opt-out of sale/sharing (or GPC) denies.
     */
    apply_filters( 'gdprcookieconsent_us_optout_categories', array( 'marketing' ) );
  • admin/modules/cookie-custom/class-gdpr-cookie-consent-cookie-custom.php line 86 · used in 4 places
    apply_filters( 'format_to_edit', stripslashes( $the_options['about_message'] ) );
  • admin/class-gdpr-cookie-consent-admin.php line 2806 · used in 4 places
    apply_filters( 'gdpr_module_after_save_settings', $the_options );
  • admin/class-gdpr-cookie-consent-admin.php line 2795 · used in 4 places
    do_action( 'gdpr_module_save_settings' );
  • admin/data-req/class-wpl-data-req-table.php line 441 · used in 3 places
    apply_filters( 'wpl_datarequest_data', $data );
  • admin/data-req/class-wpl-data-req-table.php line 153 · used in 3 places
    apply_filters( "wpl_dnsmpd_column_{$column_name}", $value, $item['ID'] );
  • admin/data-req/class-wpl-data-req-table.php line 213 · used in 3 places
    apply_filters( 'wpl_report_customer_columns', $columns );
  • admin/partials/gdpr-cookie-consent-main-admin.php line 662 · used in 2 places
    do_action( 'add_activation_key_content' );
  • admin/gdpr-cookie-consent-compliance-record-settings.php line 47 · used in 2 places
    do_action( 'add_data_request_content' );
  • gdpr-cookie-consent.php line 267 · used in 2 places
    do_action( 'appwplp_secret_key_generated', $existing_key );
  • admin/class-gdpr-cookie-consent-admin.php line 3491 · used in 2 places
    apply_filters( 'gcc_font_options', $cookie_font );
  • admin/class-gdpr-cookie-consent-admin.php line 3505 · used in 2 places
    apply_filters( 'gcc_layout_skin_options', $layout_skin );
  • admin/gdpr-cookie-consent-cookie-manager-settings.php line 112 · used in 2 places
    do_action( 'gdpr_settings_script_blocker_tab' );
  • admin/class-gdpr-cookie-consent-admin.php line 3581 · used in 2 places
    apply_filters( 'gdpr_settings_script_blocker_values', '' );
  • includes/class-gdpr-cookie-consent-cookie-inventory.php line 231 · used in 2 places
    apply_filters( 'gdprcookieconsent_cookies', $custom->get_cookies( 0 ) );
  • admin/class-gdpr-cookie-consent-admin.php line 580
    apply_filters( 'gdpr_country_codes', $country_codes );
  • admin/modules/policy-data/class-gdpr-cookie-consent-policy-data.php line 351
    apply_filters( 'gdpr_csv_export_policies_args', array( 'post_status' => array( 'publish', 'draft' ), 'post_type' => array( GDPR_POLICY_DATA_POST_TYPE ), 'orderby' => 'ID', 'numberposts' => -1, 'order' => 'ASC', ) );
  • admin/gdpr-cookie-consent-admin-settings.php line 11429
    do_action( 'gdpr_custom_css' );
  • admin/class-gdpr-cookie-consent-admin.php line 9035
    apply_filters( 'gdpr_get_last_scanned_details', $last_scanned_details );
  • admin/gdpr-cookie-consent-admin-settings.php line 904
    do_action( 'gdpr_hide_pages' );
  • admin/views/admin-display-general.php line 142
    do_action( 'gdpr_module_before_other_general' );
  • admin/views/admin-display-general.php line 233
    do_action( 'gdpr_module_other_general' );
  • admin/views/admin-display-buttons.php line 343
    do_action( 'gdpr_module_settings_button' );
  • admin/modules/cookie-custom/views/cookies.php line 63
    do_action( 'gdpr_module_settings_cookielist' );
  • admin/views/admin-display-design.php line 148
    do_action( 'gdpr_module_settings_design' );
  • admin/partials/gdpr-cookie-consent-admin-display.php line 66
    do_action( 'gdpr_module_settings_form' );
  • admin/views/admin-display-general.php line 88
    do_action( 'gdpr_module_settings_general' );
  • admin/views/admin-display-script-blocker.php line 69
    do_action( 'gdpr_module_settings_script_blocker' );
  • includes/class-gdpr-cookie-consent.php line 482
    apply_filters( 'gdpr_module_settings_tabhead', $out_arr );
  • admin/views/admin-display-general.php line 134
    do_action( 'gdpr_module_show_again_general' );
  • admin/modules/cookie-scanner/class-wpl-cookie-consent-cookie-scanner.php line 550
    do_action( 'gdpr_scan_history_table' );
  • admin/views/admin-display-design.php line 152
    do_action( 'gdpr_settings_design_tab' );
  • admin/views/admin-display-general.php line 261
    do_action( 'gdpr_settings_general_tab' );
  • public/class-gdpr-cookie-consent-public.php line 456
    apply_filters( 'gdprcookieconsent_auto_mode_disable_page_cache', true );
  • admin/class-gdpr-cookie-consent-admin.php line 4324
    apply_filters( 'gdprcookieconsent_background_border_styles', $options );
  • admin/views/admin-display-buttons.php line 27
    apply_filters( 'gdprcookieconsent_buttons_sub_tabs', $buttons_sub_tab );
  • includes/class-gdpr-cookie-consent.php line 2487
    apply_filters( 'gdprcookieconsent_ccpa_countrylist', array( 'US', ) );
  • includes/class-gdpr-cookie-consent.php line 1310
    apply_filters( 'gdprcookieconsent_default_settings', $settings );
  • admin/views/admin-display-design.php line 21
    apply_filters( 'gdprcookieconsent_design_sub_tabs', $design_sub_tab );
  • includes/class-gdpr-cookie-consent.php line 2501
    apply_filters( 'gdprcookieconsent_eu_countrylist', array( 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB', ) );
  • admin/class-gdpr-cookie-consent-admin.php line 4351
    apply_filters( 'gdprcookieconsent_fonts', $fonts );
  • admin/views/admin-display-general.php line 23
    apply_filters( 'gdprcookieconsent_general_sub_tabs', $general_sub_tab );
  • includes/class-gdpr-cookie-consent.php line 2476
    apply_filters( 'gdprcookieconsent_json_settings', $slim_settings );
  • public/class-gdpr-cookie-consent-public.php line 699
    apply_filters( 'gdprcookieconsent_law_debug', $enabled );
  • includes/class-gdpr-cookie-consent.php line 2540
    apply_filters( 'gdprcookieconsent_law_region_map', array( 'uk_gdpr' => array( 'GB' ), 'us_state_laws' => array( 'US' ), 'lgpd' => array( 'BR' ), 'pipeda' => array( 'CA' ), 'au_app' => array( 'AU' ), 'sa_pdpl' => array( 'SA' ), 'gdpr' => self::get_eu_countries(), ) );
  • admin/class-gdpr-cookie-consent-admin.php line 4374
    apply_filters( 'gdprcookieconsent_readmore_pages', $readmore_pages );
  • admin/views/admin-display-script-blocker.php line 21
    apply_filters( 'gdprcookieconsent_script_blocker_sub_tabs', $script_blocker_sub_tab );
  • includes/class-gdpr-cookie-consent.php line 2607
    apply_filters( 'gdprcookieconsent_us_state_law_groups', array( 1 => array( 'CA', 'CO', 'CT', 'MD', 'MN', 'MT', 'NE', 'NH', 'NJ', 'OR', 'TX', 'DE' ), 2 => array( 'VA', 'IN', 'KY', 'TN', 'RI' ), 3 => array( 'UT', 'IA', 'FL' ), ) );
  • admin/modules/policy-data/class-gdpr-cookie-consent-policy-data.php line 575
    do_action( 'gdprpolicies_post_import', $post_id );
  • admin/modules/policy-data/class-gdpr-cookie-consent-policy-data.php line 543
    do_action( 'gdprpolicies_pre_import', $gdpr_policies_data );
  • admin/modules/policy-data/class-gdpr-cookie-consent-policy-data.php line 537
    apply_filters( 'modify_import_gdprpoliciesdata', $gdpr_policies_data );
  • wc-am-client-gdpr.php line 209
    apply_filters( 'wc_am_client_uninstall_disable', true );
  • public/modules/script-blocker/class-wpl-cookie-consent-script-blocker.php line 1586
    apply_filters( 'wpl_regex_patterns', array( '_regexParts' => array( '-lookbehindImg' => '(?<!src=")', '-lookbehindLink' => '(?<!href=")', '-lookbehindLinkImg' => '(?<!href=")(?<!src=")', '-lookbehindShortcode' => '(?<!])', '-lookbehindAfterBody' => '(?<=\<body\>)', '-lookaheadBodyEnd' => '(?=.*\</body\>)', '-lookaheadHeadEnd' => '(?=.*\</head\>)', 'randomChars' => '[^\s\["\']+', 'srcSchemeWww' => '(?:https?://|//)?(?:[www\.]{4})?'... );
  • public/modules/script-blocker/class-wpl-cookie-consent-script-blocker.php line 1215
    apply_filters( 'wpl_script_patterns', array( 'googleanalytics' => array( 'label' => __( 'GA4', 'gdpr-cookie-consent' ), 'src' => 'google-analytics.com', 'js' => array( 'googletagmanager.com/gtag/js?id=G-', 'googletagmanager.com/gtag/js?id=UA-', 'google-analytics.com/analytics.js', 'google-analytics.com/ga.js', ), 'js_needle' => array( 'google-analytics.com/analytics.js', 'google-analytics.com/ga.js', 'stats.g.doubleclick.net/dc.js'... );
  • public/modules/consent-logs/class-wpl-cookie-consent-consent-logs.php line 298
    apply_filters( 'wplcl_csv_export_args', array( 'post_status' => array('publish'), 'post_type' => array(GDPR_Cookie_Consent), 'orderby' => 'ID', 'numberposts' => -1, 'order' => 'ASC', ) );
  • includes/class-gdpr-cookie-consent.php line 1527
    apply_filters( 'wpml_current_language', null );
  • includes/class-gdpr-cookie-consent.php line 1528
    apply_filters( 'wpml_default_language', null );

Generated from WPLP Cookie Consent's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: