WPML
add_filter( 'wcml_is_cache_enabled_for_switching_currency', 'the_callback_function', 10, 1 );
유형
filter
카테고리
다중 통화 기능
WooCommerce Multilingual 버전
4.3.3

설명

이 필터는 URL에 ?wcmlc={currency_code}를 추가하여 통화 코드가 포함된 쿼리 문자열을 지정합니다. 이는 사이트에 캐시가 활성화되어 있고 통화 변경 사항이 올바르게 표시되지 않을 때 유용합니다.

인수

이 필터에는 하나의 매개변수만 전달됩니다:

$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

모든 다중 통화 기능 훅 24개 →