WordPress at Your Fingertips
function is not described

WC_Coupon::set_virtual() public WC 3.2.0

Set coupon virtual state.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Coupon = new WC_Coupon();
$WC_Coupon->set_virtual( $virtual );
$virtual(true|false) (required)
Whether it is virtual or not.

Changelog

Since 3.2.0 Introduced.

Code of WC_Coupon::set_virtual() WC 5.7.1

public function set_virtual( $virtual ) {
	$this->set_prop( 'virtual', (bool) $virtual );
}