Update documentation for two methods in abstract-wc-order.php (#34385)
* Update abstract-wc-order.php My attempt to make the documentation clearer for these two methods. It's almost impossible to remember all nuances here, so I constantly find myself testing this. Better to have it in the documentation. * Changelog. Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
This commit is contained in:
parent
378d5f525e
commit
35f99dba7d
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
|
||||
Updates and improves the docblocks for methods WC_Order::get_total() and WC_Order::get_subtotal().
|
|
@ -417,7 +417,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets order grand total. incl. taxes. Used in gateways.
|
||||
* Gets order grand total including taxes, shipping cost, fees, and coupon discounts. Used in gateways.
|
||||
*
|
||||
* @param string $context View or edit context.
|
||||
* @return float
|
||||
|
@ -458,7 +458,9 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets order subtotal.
|
||||
* Gets order subtotal. Order subtotal is the price of all items excluding taxes, fees, shipping cost, and coupon discounts.
|
||||
* If sale price is set on an item, the subtotal will include this sale discount. E.g. a product with a regular
|
||||
* price of $100 bought at a 50% discount will represent $50 of the subtotal for the order.
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue