WC_Cart::remove_coupons()
Remove coupons from the cart of a defined type. Type 1 is before tax, type 2 is after tax.
{} It's a method of the class: WC_Cart{}
No Hooks.
Return
null
. Nothing.
Usage
$WC_Cart = new WC_Cart(); $WC_Cart->remove_coupons( $deprecated );
- $deprecated(null)
- No longer used.
Default: null
Code of WC_Cart::remove_coupons() WC Cart::remove coupons WC 6.7.0
public function remove_coupons( $deprecated = null ) { $this->set_coupon_discount_totals( array() ); $this->set_coupon_discount_tax_totals( array() ); $this->set_applied_coupons( array() ); $this->session->set_session(); }