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