WC_Legacy_Cart::add_discount()
Renamed for consistency.
Метод класса: WC_Legacy_Cart{}
Хуков нет.
Возвращает
true|false True
. if the coupon is applied, false if it does not exist or cannot be applied.
Использование
$WC_Legacy_Cart = new WC_Legacy_Cart(); $WC_Legacy_Cart->add_discount( $coupon_code );
- $coupon_code(строка) (обязательный)
- -
Код WC_Legacy_Cart::add_discount() WC Legacy Cart::add discount WC 8.7.0
public function add_discount( $coupon_code ) { return $this->apply_coupon( $coupon_code ); }