Skip to content

Negative fees added via “Add fee” don’t appear in Edit Order totals box but do apply and show in emails #62386

@MrRedFlannel

Description

@MrRedFlannel

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

When a negative fee is added to an order via the Add item(s) → Add fee control in the WooCommerce admin, the fee correctly reduces the order total and appears properly in order emails, but the fee line itself does not appear in the order totals box on the Edit Order screen when HPOS is enabled.

In other words, the discount is applied and stored correctly, but is not visibly represented as a separate line item in the admin order totals.

Note: In my original support ticket I also mentioned that line‑item discounts aggregate into the “Coupons” row in the totals. I understand from support that this is current/expected behavior (albeit confusing UX) and not being reported here as a bug. The only bug in this report is the missing negative-fee line in the Edit Order totals area.

Expected behavior

When I add a negative fee (e.g. using “-10%” or a negative fixed amount) via the Add fee button in the order editor:

The fee should:

  • Reduce the order total (which it already does), and
  • Appear as a separate line in the order totals box on the Edit Order screen,
  • Using the fee name I entered (e.g. “10% Trade Discount”),
  • Consistent with how it appears in the order emails.

The same fee/discount should be visible and clearly labeled both to the merchant in the admin and to the customer in emails.

Actual behavior

Adding a negative fee (e.g. “10% Trade Discount” with amount -10%) via Add item(s) → Add fee:

  1. Correctly reduces the order total.
  • Appears correctly in order-related emails with the proper label and amount.
  • On the Edit Order screen (with HPOS enabled):
  1. The order totals box does not show any line corresponding to that negative fee.
  • The total value is lower (reflecting the discount), but there is no visible line item explaining why—no separate “Fee” or “Discount” row showing the negative fee.
  • This occurs even with third‑party plugins (such as WP‑Lister Pro for eBay) disabled, indicating that the missing line is not caused by that plugin.

So from a data and email perspective everything is correct, but the admin UI fails to display the negative fee in the totals section, which is misleading for store managers reviewing orders.

Steps to reproduce

Reproduced on WooCommerce 10.3.6 with HPOS enabled on a clean installation.

  1. Go to WooCommerce > Orders > Add order.
  • Select or create a customer.
  • Click Add item(s) → Add products and add at least one simple product.
  1. Add a negative fee:
    Still in the Edit Order screen, click Add item(s) → Add fee.

Set:

  • Name: 10% Trade Discount (or any label).
  • Amount: -10% (or a negative fixed amount, e.g. -10).
  • Save/update the order.
  1. Observe the order totals box on the right side of the Edit Order screen:
  • The order total is correctly reduced by the fee amount.
  • There is no separate line for 10% Trade Discount (or whatever the fee was named). The totals box doesn’t show the negative fee line at all.
  1. Send or preview the order email for the same order:
  • The email shows the discount/fee line with the correct label and amount, confirming that the fee exists and is stored correctly.

WordPress Environment

WordPress Environment

`

WordPress Environment

WordPress address (URL): https://mysteriously-victorian-mouse.jurassic.ninja
Site address (URL): https://mysteriously-victorian-mouse.jurassic.ninja
WC Version: 10.4.0
Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.
Action Scheduler Version: ✔ 3.9.3
Log Directory Writable: ✔
WP Version: 6.9
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
External object cache: ✔

Server Environment

Server Info: nginx
Server Architecture: Linux 6.12.48+deb13-amd64 x86_64
PHP Version: 8.4.15
PHP Post Max Size: 2 GB
PHP Time Limit: 850
PHP Max Input Vars: 6144
cURL Version: 8.14.1
OpenSSL/3.5.4

SUHOSIN Installed: –
MySQL Version: 11.8.3-MariaDB-log
Max Upload Size: 2 GB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 10.4.0
WC Database Prefix: wp_
Total Database Size: 4.55MB
Database Data Size: 2.73MB
Database Index Size: 1.82MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 0.02MB + Index: 0.14MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_options: Data: 1.52MB + Index: 0.03MB + Engine InnoDB
wp_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_posts: Data: 0.09MB + Index: 0.08MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
wp_wc_order_stats: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpml_mails: Data: 0.08MB + Index: 0.02MB + Engine InnoDB

Post Type Counts

attachment: 1
page: 7
post: 2
product: 2
revision: 1
shop_coupon: 1
shop_order_placehold: 3
wp_font_face: 36
wp_font_family: 12
wp_navigation: 1

Security

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

Active Plugins (4)

Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.6
Jetpack: by Automattic – 15.4-a.1
WooCommerce: by Automattic – 10.4.0
WP Mail Logging: by WP Mail Logging Team – 1.15.0

Inactive Plugins (0)

Dropin Plugins ()

advanced-cache.php: advanced-cache.php
object-cache.php: Memcached

Must Use Plugins (1)

load.php: by –

Settings

Legacy API Enabled: –
Force SSL: –
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: ✔
HPOS feature enabled: ✔
Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore
HPOS data sync enabled: –
Enabled Features: analytics
marketplace
order_attribution
site_visibility_badge
remote_logging
email_improvements
blueprint
point_of_sale
custom_order_tables

Logging

Enabled: ✔
Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2
Retention period: 30 days
Level threshold: –
Log directory size: 148 KB

WC Pages

Shop base: #5 - /shop/
Cart: #6 - /cart/ - Contains the woocommerce/cart block
Checkout: #7 - /checkout/ - Contains the woocommerce/checkout block
My account: #8 - /my-account/ - Contains the [woocommerce_my_account] shortcode
Terms and conditions: ❌ Page not set

Theme

Name: Twenty Twenty-Four
Version: 1.4
Author URL: https://wordpress.org
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
Theme type: Block theme
WooCommerce Support: ❌ Not declared

Templates

Overrides: /srv/htdocs/wp-content/plugins/woocommerce/templates/block-notices/error.php
/srv/htdocs/wp-content/plugins/woocommerce/templates/block-notices/notice.php
/srv/htdocs/wp-content/plugins/woocommerce/templates/block-notices/success.php

Admin

Enabled Features: activity-panels
analytics
product-block-editor
experimental-iapi-mini-cart
coupons
core-profiler
customize-store
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
onboarding
onboarding-tasks
pattern-toolkit-full-composability
product-custom-fields
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
printful
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page
launch-your-store

Disabled Features: product-data-views
experimental-blocks
experimental-iapi-runtime
coming-soon-newsletter-template
minified-js
product-pre-publish-modal
products-catalog-api
settings
async-product-editor-category-field
product-editor-template-system
use-wp-horizon
rest-api-v4

Daily Cron: ❌ Not scheduled
Options: ✔
Notes: 56
Onboarding: skipped

Action Scheduler

Complete: 31
Oldest: 2025-12-11 05:06:23 +0000
Newest: 2025-12-11 07:09:21 +0000

Failed: 1
Oldest: 2025-12-11 05:10:10 +0000
Newest: 2025-12-11 05:10:10 +0000

Pending: 13
Oldest: 2025-12-11 08:09:21 +0000
Newest: 2025-12-12 06:00:00 +0000

Status report information

Generated at: 2025-12-11 07:29:32 +00:00
`

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.

Metadata

Metadata

Assignees

Labels

BugThe issue is a confirmed bug.Order ManagementIssues related to orders.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions