WordPress at Your Fingertips
function is not described

WC_Cart::remove_coupons() public WC 1.0

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 5.6.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();
}