| 开发者 | donaldanet1 |
|---|---|
| 更新时间 | 2026年9月1日 01:53 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[excelsior_currency_converter_switcher mode="dropdown|buttons|radio|links|flags" title=""] — the currency switcher in any format.[excelsior_currency_converter_currency_code] — the active currency ISO code.[excelsior_currency_converter_currency_symbol] — the active currency symbol.[excelsior_currency_converter_convert_price amount="10" currency=""] — convert and format a base-currency amount.[excelsior_currency_converter_price_table product_id="123"] — a product's price across every supported currency.Excelsior Currency Converter — Currency Switcher — place the currency switcher anywhere blocks are supported (post content, widget areas, and site editor templates). Choose a style (dropdown, buttons, radio, links, or flags) and an optional title in the block inspector.excelsior_currency_converter_convert_amount — filter the converted amount (per-product / per-currency overrides).excelsior_currency_converter_rounding_settings — filter the rounding rule and charm pricing per currency.excelsior_currency_converter_convert_price( $amount, $currency = '' ) / excelsior_currency_converter_active_currency() — template helpers.No — conversion is presentational only. Customers see prices in their own currency, but payment gateways always charge your store's base currency. That means no currency-mismatch disputes and no surprise fees.
Frankfurter.dev and the European Central Bank need no API key; exchangerate.host needs an API key. Rates refresh manually or on an hourly, twice-daily, or daily schedule.
Yes. It is compatible with the WooCommerce Store API (Cart and Checkout blocks), classic checkout, and HPOS (custom order tables).
Every order stores the currency and total the customer saw at checkout. Emails are pinned to that placed currency, so invoices and support conversations stay consistent even when resent later.
wp_kses_post so generated price markup is always sanitized before rendering.!important) so it overlays the page instead of being pulled into the menu's flow by theme rules like Astra's .main-navigation ul { position: relative }.rest_request_after_callbacks, which also covers preloaded and batched requests. Conversion is now idempotent so no amount is ever converted twice.batch endpoint (amounts could appear in the base currency with the active currency symbol).[excelsior_currency_converter_currency_code], [excelsior_currency_converter_currency_symbol], [excelsior_currency_converter_convert_price], and [excelsior_currency_converter_price_table] shortcodes.radio and links switcher formats.excelsior_currency_converter_convert_amount and excelsior_currency_converter_rounding_settings filters plus excelsior_currency_converter_convert_price() / excelsior_currency_converter_active_currency() helpers.excelsior_currency_converter_currency_flag_html filter for image flags.wc/store/cart registers.Cache-Control: no-store + Vary: excelsior_currency_converter_currency to Cart and Checkout pages when the active currency differs from base, preventing bfcache / disk-cache from replaying stale base values.DOMContentLoaded so the switcher IIFE no longer throws document is not defined on early-included pages.