WC_Order_Item_Coupon::get_discount()
Get discount amount.
Method of the class: WC_Order_Item_Coupon{}
No Hooks.
Return
String
.
Usage
$WC_Order_Item_Coupon = new WC_Order_Item_Coupon(); $WC_Order_Item_Coupon->get_discount( $context );
- $context(string)
- What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'
WC_Order_Item_Coupon::get_discount() WC Order Item Coupon::get discount code WC 9.4.2
public function get_discount( $context = 'view' ) { return $this->get_prop( 'discount', $context ); }