Sale price as order discount for WooCommerce

설명

When you set a sale price for a product in WooCommerce, or when the price of a product is modified by 3rd party plugins, WooCommerce does not store this price (or discount) in the order data by default. As a result, once the order is placed, the customer doesn’t see the discount they got in the email or invoice they receive, and the admin doesn’t see this in the order details either.
This is because WooCommerce only considers coupon discounts as discounts, whereas a change in price (a sale price or a programmatically modified price) is simply regarded as the actual price of the product.

This plugin addresses that issue by copying the ‘regular price’ from the product data as soon as the order is created (either in the backend or via the checkout). This price is then set as the item’s “pre-discount” price (leaving the actual price paid untouched). The result is that WooCommerce will show this the same way it shows coupon discounts.

FAQ

Something is not working correctly

Please post a message to our support forum and we’ll do our best to help resolve your issue!

How can I contribute to this project?

This project is hosted on github: https://github.com/wpovernight/sale-discount-for-woocommerce
If you want to contribute to the code, feel free to submit a PR. You can also open issues on Github, although we encourage you to open a ticket in the support forum here on WordPress.org first if you’re not absolutely sure something is a bug.

후기

모든 2 평가 읽기

기여자 & 개발자

“Sale price as order discount for WooCommerce”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Sale price as order discount for WooCommerce”(이)가 8 개 언어로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Sale price as order discount for WooCommerce”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.1.12 (2025-11-14)

  • New: Allow the theme to override regular price before setting the subtotal. Thanks to @scratchdigital
  • Tested up to WooCommerce 10.3 & WordPress 6.9

1.1.11 (2025-05-13)

  • New: Minimum PHP version requirement updated to 7.4
  • Tested up to WooCommerce 9.8 & WordPress 6.8

1.1.10 (2024-11-04)

  • Fix: remove files from SVN that were mistakenly left undeleted

1.1.9 (2024-10-30)

  • New: comply with WP Plugin Check standards

1.1.8 (2024-10-23)

  • Fix: issue with HPOS compatibility declaration

1.1.7 (2024-10-14)

  • Fix: Load plugin translations later in the init hook.
  • Tested: Compatible with WooCommerce 9.4.

1.1.6 (2024-06-26)

  • Tested up to WooCommerce 9.0 & WordPress 6.6

1.1.5 (2024-03-20)

  • Translations: updated translation template (POT)
  • Tested up to WooCommerce 8.7 & WordPress 6.5

1.1.4 (2023-11-08)

  • Tested up to WooCommerce 8.3 & WordPress 6.4

1.1.3 (2023-08-09)

  • Tested up to WooCommerce 8.0 & WordPress 6.3

1.1.2

  • Tested up to WooCommerce 7.6 & WordPress 6.2

1.1.1

  • Declared compatibility with WooCommerce HPOS
  • Tested up to WooCommerce 7.1 & WordPress 6.1

1.1.0

  • New: Allow storing discount for non-sale items (filter: wpo_wc_sale_discount_apply_to_item)

1.0.1

  • Fix: Loading textdomain
  • Translations: Added Spanish

1.0.0

  • First public release