WC_Order_Item_Coupon::get_code()publicWC 1.0

Get coupon code.

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_code( $context );
$context(string)
What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'

WC_Order_Item_Coupon::get_code() code WC 9.4.2

public function get_code( $context = 'view' ) {
	return $this->get_prop( 'code', $context );
}