wcml_user_store_strategy
- Type
- filter
- Category
- Multi-currency Feature
- WooCommerce Multilingual Version
- 4.11.0
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
- $key
- (string) The key operating the storage
Example usage
// Use Cookie instead of WCSession
add_filter( 'wcml_user_store_strategy', function ( $strategy, $key ) {
return 'cookie';
}, 10, 2 );
Related hooks
wcml_custom_prices_fields_labels, wcml_is_cache_enabled_for_switching_currency, wcml_geolocation_get_user_country, wcml_rounded_price, wcml_currencies_without_cents, wcml_product_custom_prices, wcml_custom_prices_strings, wcml_switch_currency, wcml_custom_prices_fields, wcml_multi_currency_ajax_actions