WC_Coupon::set_free_shipping
Set if this coupon enables free shipping or not.
Method of the class: WC_Coupon{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Coupon = new WC_Coupon(); $WC_Coupon->set_free_shipping( $free_shipping );
- $free_shipping(true|false) (required)
- If grant free shipping.
Changelog
| Since 3.0.0 | Introduced. |
WC_Coupon::set_free_shipping() WC Coupon::set free shipping code WC 10.4.3
public function set_free_shipping( $free_shipping ) {
$this->set_prop( 'free_shipping', (bool) $free_shipping );
}