WC_Order_Item_Coupon::set_code()publicWC 1.0

Set code.

{} 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_code( $value );
$value(string) (required)
Coupon code.

Code of WC_Order_Item_Coupon::set_code() WC 6.7.0

public function set_code( $value ) {
	$this->set_prop( 'code', wc_format_coupon_code( $value ) );
}