apply_filters( 'wcml_price_currency', mixed $empty_value )
- 类型
- filter
- 类别
- 多货币功能
- WooCommerce Multilingual 版本
- 3.5
说明
- 获取在前端设置的当前货币。
- 此过滤器在前端可用。
参数
- $empty_value
- (mixed) (必填) 通常,这是过滤器将要修改的值。我们在这里不进行任何过滤,因此您应该将其设置为 NULL。此参数允许过滤器的函数接收完整的参数列表。
使用示例
基本示例
$current_currency = apply_filters('wcml_price_currency', NULL );
相关钩子
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_currencies_without_cents, wcml_product_custom_prices, wcml_custom_prices_strings, wcml_switch_currency, wcml_custom_prices_fields