add_filter( 'wcml_is_cache_enabled_for_switching_currency', 'the_callback_function', 10, 1 );
- タイプ
- filter
- カテゴリー
- 多通貨機能
- WooCommerce Multilingualバージョン
- 4.3.3
説明
このフィルターはURLに?wcmlc={currency_code}を追加し、通貨コードを含むクエリ文字列を指定します。これは、サイトでキャッシュが有効化されていて、通貨の変更が正しく表示されない場合に役立ちます。
引数
このフィルターには1つのパラメーターのみが渡されます。$enabled
- (bool) フィルターを有効化するにはtrueに設定します。
使用例
例
/** * Enable the query string argument on currency change. */ add_filter( 'wcml_is_cache_enabled_for_switching_currency', '__return_true' );
関連するフック
wcml_custom_prices_fields_labels, wcml_geolocation_get_user_country, wcml_user_store_strategy, 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