WC_Coupon::get_virtual( string $context = 'view' )

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


Description Description


Parameters Parameters

$context

(Optional) What the value is for. Valid values are 'view' and 'edit'.

Default value: 'view'


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/class-wc-coupon.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.