WPML
PHP
wcml_user_store_strategy

Description

Allows overriding the storage strategy. The default storage is wc-session, and the only current alternative is cookie.

Arguments

  • ‘wc-session’string

    Storage strategy
  • $keystring

    The key operating the storage

Example Usage

PHP
// Use Cookie instead of WCSession
add_filter( 'wcml_user_store_strategy', function ( $strategy, $key ) {
	return 'cookie';
}, 10, 2 );