WordPress at Your Fingertips
function is not described

WC_Order_Item_Coupon::set_discount() public WC 1.0

Set discount amount.

{} It's a method of the class: WC_Order_Item_Coupon{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Order_Item_Coupon = new WC_Order_Item_Coupon();
$WC_Order_Item_Coupon->set_discount( $value );
$value(string) (required)
Discount.

Code of WC_Order_Item_Coupon::set_discount() WC 5.8.0

public function set_discount( $value ) {
	$this->set_prop( 'discount', wc_format_decimal( $value ) );
}