WordPress action hook

wpsc_delete_cookie

Fired by 5 WordPress plugins, running on 805K+ sites between them.

“Remove the cookies in WP Super Cache.”

How to use wpsc_delete_cookie

It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'wpsc_delete_cookie', function( $arg1 ) {
	// Your code runs here.
}, 10, 1 );

Argument names come from Cookie Compliance for WordPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

5 plugins that fire wpsc_delete_cookie

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Cookie Compliance for WordPress icon Cookie Compliance for WordPress800,000+ installs do_action( 'wpsc_delete_cookie', 'cookie_notice_accepted' ) cookie-notice.php:2674
  2. Lightweight Cookie Notice icon Lightweight Cookie Notice5,000+ installs do_action( 'wpsc_delete_cookie', 'daextlwcnf-accepted' ) admin/class-daextlwcnf-admin.php:860
  3. PDPA Consent for Thailand icon PDPA Consent for Thailand300+ installs do_action( 'wpsc_delete_cookie', 'pdpa_accepted' ) pdpa-consent.php:202
  4. Glovario icon GlovarioFewer than 10 installs do_action( 'wpsc_delete_cookie', StandaloneLocale::COOKIE ) src/Locale/PageCacheCompatibility.php:94
  5. Cartnorm B2B icon Cartnorm B2BFewer than 10 installs do_action( 'wpsc_delete_cookie', self::COOKIE ) includes/class-cache.php:404

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.