add_filter( 'wcml_currencies_without_cents', 'the_callback_function' );
- ประเภท
- filter
- หมวดหมู่
- ฟีเจอร์หลายสกุลเงิน
- เวอร์ชันของ WooCommerce Multilingual
- 4.0.0
คำอธิบาย
- กรองอาร์เรย์ของสกุลเงินที่ไม่มีหน่วยเซนต์
- ตามค่าเริ่มต้น อาร์เรย์นี้จะรวมสกุลเงินต่อไปนี้:
array('JPY', 'TWD', 'KRW', 'BIF', 'BYR', 'CLP', 'GNF', 'ISK', 'KMF', 'PYG', 'RWF', 'VUV', 'XAF', 'XOF', 'XPF');
อาร์กิวเมนต์
มีพารามิเตอร์เพียงตัวเดียวที่ส่งไปยังฟิลเตอร์นี้: currencies- $currencies
- (array) อาร์เรย์ของสกุลเงินที่ไม่มีหน่วยเซนต์
ตัวอย่างการใช้งาน
ตัวอย่าง
add_filter( 'wcml_currencies_without_cents', 'wcmlhook_currencies_without_cents' );
function wcmlhook_currencies_without_cents( $currencies ) {
$currencies[] = 'ABC' // Add a new currency to this array
return $currencies;
}
ฮุกที่เกี่ยวข้อง
wcml_custom_prices_fields_labels, wcml_is_cache_enabled_for_switching_currency, wcml_geolocation_get_user_country, wcml_user_store_strategy, wcml_rounded_price, wcml_product_custom_prices, wcml_custom_prices_strings, wcml_switch_currency, wcml_custom_prices_fields, wcml_multi_currency_ajax_actions