WordPress at Your Fingertips
function is not described

WC_Coupon::get_virtual() public WC 3.2.0

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

{} It's a 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.

Code of WC_Coupon::get_virtual() WC 5.6.0

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