WordPress at Your Fingertips
function is not described

WC_Coupon::set_free_shipping() public WC 3.0.0

Set if this coupon enables free shipping or not.

{} It's a method of the class: WC_Coupon{}

No Hooks.

Return

null. Nothing.

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.

Code of WC_Coupon::set_free_shipping() WC 5.6.0

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