WC_Cart::remove_coupons()publicWC 1.0

Remove coupons from the cart of a defined type. Type 1 is before tax, type 2 is after tax.

Method of the class: WC_Cart{}

No Hooks.


null. Nothing (null).


$WC_Cart = new WC_Cart();
$WC_Cart->remove_coupons( $deprecated );
No longer used.
Default: null

WC_Cart::remove_coupons() code WC 8.9.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() );