WPML
apply_filters( 'wcml_price_currency', mixed $empty_value )
Loại
filter
Phiên bản WooCommerce Multilingual
3.5

Miêu tả

  • Lấy tiền tệ hiện tại được thiết lập trên giao diện người dùng.
  • Bộ lọc này có sẵn trên giao diện người dùng.

Đối số

$empty_value
(mixed) (Bắt buộc) Thông thường, đây là giá trị mà bộ lọc sẽ sửa đổi. Chúng ta không lọc bất kỳ thứ gì ở đây, vì vậy bạn nên đặt giá trị này thành NULL. Đối số này cho phép hàm của bộ lọc nhận danh sách đầy đủ các đối số.

Ví dụ sử dụng

Một ví dụ cơ bản
$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

Tất cả 24 hook Tính năng đa tiền tệ →