WC_Coupon::set_free_shipping()publicWC 3.0.0

Set if this coupon enables free shipping or not.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$WC_Coupon = new WC_Coupon();
$WC_Coupon->set_free_shipping( $free_shipping );
$free_shipping(true|false) (обязательный)
If grant free shipping.

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

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

Код WC_Coupon::set_free_shipping() WC 8.7.0

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