WordPress filter hook

wp_session_cookie_secure

Fired by 8 WordPress plugins, running on 39K+ sites between them.

How to use wp_session_cookie_secure

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:

functions.php
add_filter( 'wp_session_cookie_secure', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Argument names come from WP Travel Engine's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

8 plugins that fire wp_session_cookie_secure

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

  1. WP Travel Engine icon WP Travel Engine20,000+ installs apply_filters( 'wp_session_cookie_secure', false ) includes/classes/Utilities/WPSession.php:125
  2. Charitable icon Charitable10,000+ installs apply_filters( 'wp_session_cookie_secure', false ) includes/libraries/wp-session/class-wp-session.php:162
  3. WP Delicious icon WP Delicious4,000+ installs apply_filters( 'wp_session_cookie_secure', false ) src/lib/wp-session/class-wp-session.php:291
  4. WP Travel icon WP Travel3,000+ installs apply_filters( 'wp_session_cookie_secure', false ) inc/lib/wp-session/class-wp-session.php:131
  5. Restaurant Menu and Food Ordering icon Restaurant Menu and Food Ordering2,000+ installs apply_filters( 'wp_session_cookie_secure', false ) classes/libs/wp_session/class-wp-session.php:130
  6. Ninja Shop icon Ninja Shop20+ installs apply_filters( 'wp_session_cookie_secure', false ) lib/sessions/db_session_manager/class-db-session.php:210
  7. Widget Master icon Widget Master10+ installs apply_filters( 'wp_session_cookie_secure', false ) includes/includes/class-wp-session.php:126
  8. Post and Page Protect with Azure AD icon Post and Page Protect with Azure ADFewer than 10 installs apply_filters( 'wp_session_cookie_secure', false ) vendors/wp-session-manager/includes/class-wp-session.php:138

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.