WordPress at Your Fingertips
function is not described

WC_Order_Item_Coupon::offsetGet() public WC 1.0

Deprecated from version 4.4.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

OffsetGet for ArrayAccess/Backwards compatibility.

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

No Hooks.

Return

Mixed.

Usage

$WC_Order_Item_Coupon = new WC_Order_Item_Coupon();
$WC_Order_Item_Coupon->offsetGet( $offset );
$offset(string) (required)
Offset.

Changelog

Deprecated 4.4.0

Code of WC_Order_Item_Coupon::offsetGet() WC 5.8.0

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