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'
Return Return
(boolean)
Source Source
File: includes/class-wc-coupon.php
public function get_virtual( $context = 'view' ) { return (bool) $this->get_prop( 'virtual', $context ); }
Changelog Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |