WC_Coupon::get_virtual()publicWC 3.2.0

If the filter is added through the woocommerce_get_shop_coupon_data filter, it's virtual and not in the DB.

Method of the class: WC_Coupon{}

No Hooks.

Return

true|false.

Usage

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

Changelog

Since 3.2.0 Introduced.

WC_Coupon::get_virtual() code WC 9.4.2

public function get_virtual( $context = 'view' ) {
	return (bool) $this->get_prop( 'virtual', $context );
}