WPML
add_filter( 'wcml_is_cache_enabled_for_switching_currency', 'the_callback_function', 10, 1 );
النوع
filter
إصدار WooCommerce Multilingual
4.3.3

الوصف

يضيف هذا المرشِّح ?wcmlc={currency_code} إلى عنوان URL، مما يحدد سلسلة استعلام برمز العملة. يُعد هذا مفيداً عندما يتم تمكين التخزين المؤقت في موقعك ولا يعرض تغييرات العملة بشكل صحيح.

الوسطاء

تُمرَّر مَعلمة واحدة فقط إلى هذا المرشِّح:

$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 →