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.

Метод класса: WC_Coupon{}

Хуков нет.

Возвращает

true|false.

Использование

$WC_Coupon = new WC_Coupon();
$WC_Coupon->get_virtual( $context );
$context(строка)
What the value is for. Valid values are 'view' and 'edit'.
По умолчанию: 'view'

Список изменений

С версии 3.2.0 Введена.

Код WC_Coupon::get_virtual() WC 8.7.0

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