Keelson Order Fee for Checkout Block

By kpsanmao

0+ active installationsVersion 1.0.0

Add an optional fee to the WooCommerce Checkout block. Customers tick a box, such as gift wrapping, and the fee is added to the order.

Description

Keelson Order Fee for Checkout Block adds one optional checkbox to your WooCommerce checkout. When the customer ticks it, a fee is added to the order. When they leave it empty, nothing is added.

It works with the WooCommerce Checkout block, which is the default checkout in current WooCommerce. It also works with the classic shortcode checkout.

Typical uses:

  • Gift wrapping
  • Rush handling
  • Signature on delivery
  • Any small extra service you charge for

How the fee is calculated

The calculation is simple, and the settings page shows it in plain words:

  • The fee is one fixed amount per order. It does not change with the number of items.
  • The amount you enter is the price before tax.
  • If you turn on “Charge tax on this fee”, tax is calculated with the standard rate for the customer’s address and added on top of the amount.
  • The checkbox label shows the amount, for example “Gift wrapping (+$5.00 plus tax)”.
  • The fee appears as its own line in the order total, in the order confirmation, in emails and in the admin order screen.

Safe by design

  • The amount is set on the server. The browser only says whether the box is ticked, so a customer cannot change the price.
  • If the settings are not valid, no fee is charged.
  • The choice is cleared after the order is placed or the cart is emptied, so a fee never carries over to the next order.
  • If the box is ticked when the order is placed, the order gets the fee, even if the page was slow to refresh.

Compatibility

  • Declares support for High-Performance Order Storage (HPOS).
  • Declares support for the Cart and Checkout blocks.
  • Requires WooCommerce 9.8 or newer. Tested with WooCommerce 11.2.

Privacy

This plugin does not collect personal data, does not set cookies of its own and does not contact any external service. The customer’s choice is kept in the WooCommerce session until the order is placed.

Developers

The plugin has filters and actions so that other plugins can add conditions, other ways to calculate the amount and more fees. See the OFCB_API_VERSION constant and the filters beginning with ofcb_.

Installation

  1. Make sure WooCommerce is installed and active.
  2. Upload the plugin to the /wp-content/plugins/ directory, or install it from the Plugins screen.
  3. Activate the plugin.
  4. Go to WooCommerce → Order Fee.
  5. Turn on the fee, enter a name and an amount, and save.

FAQ

Does it work with the WooCommerce Checkout block?

Yes. That is what it was built for. The checkbox appears in the “Additional order information” section.

Does it work with the classic shortcode checkout?

Yes. The checkbox appears above the payment methods.

Is the fee charged by default?

No. The fee is only charged when the customer ticks the box.

Is the amount entered with or without tax?

Without tax. If you turn on tax for the fee, tax is added on top of the amount.

Can I charge a percentage or add more than one fee?

Not in this version. The plugin has hooks so that an extension can add these.

What happens when I uninstall the plugin?

Deleting the plugin removes its settings. Existing orders keep their fee lines, because those are part of the order.

Changelog

1.0.0

  • First release.