WC_Coupon::set_free_shipping()publicWC 3.0.0

Set if this coupon enables free shipping or not.

Method of the class: WC_Coupon{}

No Hooks.

Return

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() code WC 9.4.2

public function set_free_shipping( $free_shipping ) {
	$this->set_prop( 'free_shipping', (bool) $free_shipping );
}