Configuration
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
All of Surcharge lives on one screen at WooCommerce → Surcharge. The screen has a General card with the master switch and a Fees card with a repeatable table of fee rows. Everything is stored in a single option, surcharge_settings, and the screen is gated to the manage_woocommerce capability so shop managers, not just administrators, can save it.
Master switch
Section titled “Master switch”The Enable fees checkbox in the General card is the master switch. When it is off, no fee is added to any cart regardless of the rows below, and the header badge reads Disabled. Turn it off to pause every fee at once (during a sale, while testing, out of season) without deleting anything. It is stored as surcharge_settings['enabled'].
A fee row
Section titled “A fee row”Each row in the Fees card is one fee. You can add as many as you need with Add fee and drop one with Remove fee (at least one row always stays on screen). A row has five fields.
The text shoppers see in the cart and checkout totals, on the order, and in order emails. This is the only explanation the customer gets for the extra line, so keep it specific, for example Cash on delivery fee or Handling charge. A row with a blank label is skipped: it is not saved if it also has no amount, and it is not applied to the cart even if it is.
If two fees share the same label, the second is automatically suffixed with #N (its row number) so WooCommerce keeps them as separate lines instead of merging them.
- Fixed amount, a flat value added once to the cart, in your store currency.
- Percentage of cart, a percentage of the cart contents subtotal including line tax, calculated before existing fees and shipping. A 3% fee on a 100.00 subtotal adds 3.00.
Amount
Section titled “Amount”The number the type acts on. For a fixed fee it is a currency value (e.g. 3.50); for a percentage fee it is a value from 0 to 100. On save the value is coerced to a number through wc_format_decimal, negatives become zero, and percentages are clamped to a 0-100 range. A fee whose resolved amount is zero or less is silently skipped at checkout.
Taxable
Section titled “Taxable”When on, WooCommerce applies your standard tax rules to the fee, exactly as it would to a product. When off, the fee is added as a tax-free line. Leave it off unless your accounting requires the surcharge itself to be taxed.
Enabled
Section titled “Enabled”A per-row toggle, separate from the master switch. Unticking Enabled keeps the row and all its values saved but stops the fee from being charged. Use it to park a seasonal fee without retyping it later. New rows default to enabled.
What is not configurable
Section titled “What is not configurable”A few things are fixed by the free edition’s design:
- No conditional rules. There are no cart-minimum, payment-method or shipping-country conditions. Every enabled fee with an amount applies to every cart while the master switch is on. (A planned Surcharge Pro add-on adds conditions via the
surcharge/fee_appliesfilter, see Recipes.) - Percentage base is fixed to the cart contents subtotal including line tax, before fees and shipping.
- No shortcode or template, fees are output by WooCommerce itself in the totals table, so there is nothing to place or override in your theme.
How the screen behaves without JavaScript
Section titled “How the screen behaves without JavaScript”The settings screen is progressive enhancement. With JavaScript on, Add fee / Remove fee clone and re-index rows in the browser, and a small “receipt” readout next to each row mirrors the chosen Type. With JavaScript off, the first row is still present and saved on submit; the receipt readout is hidden. Nothing about saving depends on JavaScript.
Storage and cleanup
Section titled “Storage and cleanup”All settings live in the single surcharge_settings option (the master switch plus the fee list). Surcharge stores no custom tables and contacts no external service. Deleting the plugin from the Plugins screen runs its uninstall routine, which removes surcharge_settings and the internal surcharge_db_version option.
Related
Section titled “Related”- Getting started, install and add your first fee.
- Fee recipes, worked examples of common setups.
- FAQ, common questions.