WC_Cart::clear_shipping_totals │ private │ WC 1.0

Reset the shipping totals, taxes and methods to none calculated.

Method of the class: WC_Cart{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->clear_shipping_totals(): void;

WC_Cart::clear_shipping_totals() code WC 11.3.0

private function clear_shipping_totals(): void {
	$this->set_shipping_total( 0 );
	$this->set_shipping_tax( 0 );
	$this->set_shipping_taxes( array() );
	$this->shipping_methods        = array();
	$this->has_calculated_shipping = false;
}