WC_Coupon::get_code()publicWC 3.0.0

Get coupon code.

Method of the class: WC_Coupon{}

No Hooks.

Return

String.

Usage

$WC_Coupon = new WC_Coupon();
$WC_Coupon->get_code( $context );
$context(string)
What the value is for. Valid values are 'view' and 'edit'.
Default: 'view'

Changelog

Since 3.0.0 Introduced.

WC_Coupon::get_code() code WC 8.6.1

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