前言介紹
- 這款 WordPress 外掛「Tax Switch for WooCommerce」是 2024-09-22 上架。
- 目前有 300 個安裝啟用數。
- 上一次更新是 2025-04-30,距離現在已有 3 天。
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.2 以上。
- 有 10 人給過評分。
- 論壇上目前有 6 個提問,問題解答率 100% ,不低,算是個很有心解決問題的開發者團隊了!
外掛協作開發者
外掛標籤
tax | vat | woocommerce |
內容簡介
總結:
Tax Switch for WooCommerce 可以讓使用者在價格包含或不包含增值稅(VAT)之間切換,增強您的 WooCommerce 商店。這個外掛在商品頁面上添加一個可自定義的開關,提供了靈活的價格顯示方式。
問題與答案:
1. 如何增強您的 WooCommerce 商店?
- 使用 Tax Switch for WooCommerce 外掛讓使用者可以切換價格是否包含或不包含增值稅(VAT)。
2. 如何在哪裡顯示可自定義開關?
- 可以在商品頁面添加可自定義開關。
3. 這個外掛的關鍵功能有哪些?
- 可以在需要的地方顯示可自定義開關、支援 Gutenberg 塊、提供易於集成的短代碼以及靈活的價格顯示選項。
4. 如何使用短代碼來自定義開關的外觀和行為?
- 使用 [wdevs_tax_switch] 短代碼,可以指定類名、開關手柄顏色、開關啟動時的顏色、開關背景色等屬性來自定義外觀和行為。
5. 是否可以在主題文件中使用此短代碼?
- 是的,您可以使用 do_shortcode() 函數在主題文件中使用此短代碼。
6. 需要什麼條件才能使用此外掛?
- 您需要安裝並啟用 WooCommerce 外掛,並且啟用並配置 WooCommerce 稅費計算才能使用。
原文外掛簡介
Tax Switch for WooCommerce enhances your WooCommerce store by allowing users to toggle between displaying prices including or excluding VAT. This plugin adds a customizable switch component and provides a flexible way to display both price versions.
Key features
Display customizable switches where you want
Gutenberg block support
Shortcode for easy integration (including shortcode generator)
Flexible display options for prices with and without VAT
Remembers the user’s preference for future visits
Choose between a toggle switch or buttons
For more information about this plugin, please visit the plugin page.
Compatibility
This plugin integrates with WooCommerce’s standard filters and actions for price display and calculation. While most plugins and themes work out of the box, some third-party code use custom price building methods that require specific compatibility integrations.
The following themes have been tested and confirmed compatible:
GeneratePress
Blocksy
Thrive
Flatsome
The following plugins have been tested and confirmed compatible:
WooCommerce Product Table Lite (+ PRO)
Tiered Pricing Table for WooCommerce (+ Premium)
Measurement Price Calculator for WooCommerce
Discount Rules for WooCommerce
YITH WooCommerce Product Add-Ons (+ & Extra Options Premium)
JetEngine Listing Grid (Elementor)
Product Add-Ons for WooCommerce
B2BKing – Ultimate WooCommerce Wholesale and B2B Solution (+ Premium)
Advanced Product Fields Pro for WooCommerce
WooCommerce Quantity Discounts, Rules & Swatches
FacetWP
If you encounter any compatibility issues with other plugins or themes, please let us know. Your feedback helps us improve the plugin and extend compatibility to more third-party solutions.
Incompatibility
After multiple attempts to create compatibility functions, reaching out to the plugin developers several times, and still finding no viable solution, the following plugins remain incompatible:
Unlimited Elements for Elementor (+ Pro): AJAX pagination and filtering issues
WPML
To translate the option texts via WPML:
Save your options first in: WooCommerce -> Settings -> Tax Switch
Then translate the texts in: WPML -> String Translations and search for your option values in the domain ‘tax-switch-for-woocommerce’
Requirements
WooCommerce plugin installed and activated
WooCommerce tax calculations enabled and configured
Usage
After installation and configuration, you can add the tax switch to your pages in two ways:
Use the Gutenberg block “Tax Switch for WooCommerce” in your page or post editor.
Use the shortcode [wdevs_tax_switch] anywhere in your content.
Shortcode Usage
Switch/buttons
Basic usage:
[wdevs_tax_switch]
The shortcode accepts several attributes to customize its appearance and behavior:
class-name: Adds custom CSS classes to the switch.
Default: is-style-default
Options: is-style-default, is-style-inline, or custom classes
switch-type: Determines the style of the toggle.
Default: switch
Options: switch, buttons
switch-color: Sets the color of the switch handle.
switch-color-checked: Sets the color of the switch when it’s in the “on” position.
switch-background-color: Sets the background color of the switch.
switch-text-color: Sets the text color of the switch labels.
switch-background-color-checked: Sets the background color of the switch when it’s in the “on” position.
switch-label-incl: Sets the text for the “including VAT” label.
Default: Uses the text set in the plugin settings or “Incl. VAT” if not set.
switch-label-excl: Sets the text for the “excluding VAT” label.
Default: Uses the text set in the plugin settings or “Excl. VAT” if not set.
Example with custom attributes:
[wdevs_tax_switch class-name="is-style-inline" switch-type="switch" switch-color="#ffffff" switch-color-checked="#000000" switch-background-color="#000000" switch-background-color-checked="#4CAF50" switch-text-color="#FF0000" switch-label-incl="Incl. tax" switch-label-excl="Excl. tax"]
This will display an inline-style switch with a white handle that turns black when on, a black background when off, green background when on, and custom labels for including and excluding tax.
Label
Basic usage:
[wdevs_tax_switch_label]
Displays text indicating the currently selected tax setting. The text updates automatically when the tax switch is toggled.
Attributes:
* class-name: Adds custom CSS classes to the label.
– Default: is-style-default
– Options: is-style-default or custom classes
* label-text-incl: Sets the text to display when “including VAT” is selected.
– Default: Uses the text set in the plugin settings or “Incl. VAT” if not set.
* label-text-excl: Sets the text to display when “excluding VAT” is selected.
– Default: Uses the text set in the plugin settings or “Excl. VAT” if not set.
* label-text-color: Sets the “excluding VAT” text color.
* label-text-color-checked: Sets the “including VAT” text color.
Example with custom attributes:
[wdevs_tax_switch_label class-name="tax-indicator" label-text-incl="Prices include tax" label-text-excl="Prices exclude tax" label-text-color="#FF0000" label-text-color-checked="#4CAF50"]
PHP implementation
You can use these shortcodes with PHP with the do_shortcode() function:
JavaScript events
The switch fires a JavaScript event when the tax display is toggled. You can listen for this event to execute custom code when a user switches between inclusive and exclusive tax display. This is useful for when you need to perform additional actions based on the tax display state.
document.addEventListener('wdevs-tax-switch-changed', function(event) {
console.log(event.detail);
// event.detail contains:
// - isSwitched: boolean - the raw switch state
// - displayIncludingVat: boolean - whether prices now display including VAT
});
Additional Information
For more information and other WordPress plugins, visit Wijnberg Developments.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Tax Switch for WooCommerce」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.1.0 | 1.1.1 | 1.1.3 | 1.1.4 | 1.1.5 | 1.1.6 | 1.1.7 | 1.1.8 | 1.1.9 | 1.2.0 | 1.2.1 | 1.2.2 | 1.2.3 | 1.2.4 | 1.2.5 | 1.3.0 | 1.3.1 | 1.3.2 | 1.4.0 | 1.4.3 | 1.5.0 | trunk | 1.1.10 | 1.1.11 |
延伸相關外掛(你可能也想知道)
NIF (Num. de Contribuinte Português) for WooCommerce 》此外掛將在收銀台和訂單詳情頁面上,新增一個欄位以輸入葡萄牙增值稅識別號(NIF/NIPC),只有當帳單地址為葡萄牙時,此欄位才會顯示。, 您的 WooCommerce 商店...。
WooCommerce PDF Invoices Italian Add-on 》This WordPress plugin adds everything necessary for an Italian e-commerce store on WooCommerce. It includes an option for collecting data required ...。
EU/UK VAT Validation Manager for WooCommerce 》ber will be automatically included in the invoice data, making it compliant with EU VAT regulations., 4. Multisite Support:, The plugin can be used...。
WooCommerce Accounting Report 》這是一份能讓你的會計師開心的報告!, 您可以在 WooCommerce->報告部分找到報告(如果您需要特定國家的報告,請聯繫我們,我們會添加需要的內容), 報告可...。
Contribuinte Checkout 》這個外掛可以讓你將增值稅 (VAT) 和歐盟增值稅資訊系統 (VIES) 加入你的 WooCommerce 商店。增值稅欄位將被儲存在 '_billing_vat' 中。, 重要提示:此外掛需...。
WooCommerce Quaderno – Tax Automation 》Quaderno外掛程式為WooCommerce提供簡單的解決方案,自動計算每筆銷售的稅款,並提供符合稅務規定的收據和信用票據。無論客戶位於何處,透過Quaderno處理的交...。
Tax Exemption for WooCommerce 》- 允許客戶在 WooCommerce 結帳時宣告免稅狀態並提供免稅/增值稅豁免詳細資料。, - 安裝外掛並在 WordPress 管理者區塊的 "WooCommerce" 中訪問 &q...。
Accounting for WooCommerce 》這個外掛可為每種類型的資料(產品、稅金、運費、付款方式、帳戶號碼和分析數據)定義全域代碼。, 您可以通過日期和狀態篩選,設置欄和分隔符,並將訂單導出...。
Nastavenia SK/CZ pre WooCommerce 》這個外掛目前仍在開發中,尚未完全完成,目前處於 beta 階段(這表示所有功能應該都可以使用,除了可能會有一些未察覺的錯誤)。如果有任何反饋、建議或改進...。
Rename VAT to GST for WooCommerce 》許多國家使用GST代替VAT。WooCommerce沒有將VAT重新命名為其他選項的選項。這個簡單的小插件將WooCommerce中的VAT重新命名為GST,包括郵件和購物車/結帳頁面...。
RD Order Modifier for WooCommerce 》WooCommerce訂單修改器允許在WooCommerce管理區域中編輯產品項目價格,包含稅費,作為WooCommerce默認支持的排除稅費編輯的替代方案。, 安裝與使用, 將RD訂單...。
EDD Quaderno 》Quaderno for EDD 是一款 WordPress 外掛,可以自動計算每筆銷售的稅金,並提供漂亮的收據,無論您的客戶位於何處。透過 Quaderno 處理的交易和收據始終遵循...。
VIES Validator 》這個外掛可以讓你使用 Agenzia delle Entrate 的線上 VIES 服務,驗證你的客戶增值稅號碼。, 如果你目前沒有增值稅號碼欄位,你可以在設定選單中輕鬆地新增一...。
VAT / UST ID Checker – Validator EU for WooCommerce 》這是一個小型的外掛程式,可讓您在 WooCommerce 中應用反向收費(歐洲)。, 特點, 這個針對 WooCommerce 的小型外掛程式允許您:, , 1.) 檢查客戶提供的增值...。
WooCommerce VAT to API 》此外掛擴充了 WooCommerce 和 Booster for WooCommerce 的功能。當 API 呼叫時,它會在帳單地址中添加一個名為「vat_number」(統一編號)的新項目,並且在手動...。