WC_Discounts::get_discounts()
Get all discount totals.
Method of the class: WC_Discounts{}
No Hooks.
Return
Array
.
Usage
$WC_Discounts = new WC_Discounts(); $WC_Discounts->get_discounts( $in_cents );
- $in_cents(true|false)
- Should the totals be returned in cents, or without precision.
Default: false
Changelog
Since 3.2.0 | Introduced. |
WC_Discounts::get_discounts() WC Discounts::get discounts code WC 9.7.1
public function get_discounts( $in_cents = false ) { $discounts = $this->discounts; return $in_cents ? $discounts : wc_remove_number_precision_deep( $discounts ); }