WC_Order_Item_Coupon::offsetSet()publicWC 1.0

[\ReturnTypeWillChange]

{} 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->offsetSet( $offset, $value );
$offset (required)
-
$value (required)
-

Code of WC_Order_Item_Coupon::offsetSet() WC 6.7.0

public function offsetSet( $offset, $value ) {
	wc_deprecated_function( 'WC_Order_Item_Coupon::offsetSet', '4.4.0', '' );
	if ( 'discount_amount' === $offset ) {
		$offset = 'discount';
	} elseif ( 'discount_amount_tax' === $offset ) {
		$offset = 'discount_tax';
	}
	parent::offsetSet( $offset, $value );
}