WC_Cart::calculate_shipping PHP Method

calculate_shipping() public method

Uses the shipping class to calculate shipping then gets the totals when its finished.
public calculate_shipping ( )
    public function calculate_shipping()
    {
        if ($this->needs_shipping() && $this->show_shipping()) {
            WC()->shipping->calculate_shipping($this->get_shipping_packages());
        } else {
            WC()->shipping->reset_shipping();
        }
        // Get totals for the chosen shipping method
        $this->shipping_total = WC()->shipping->shipping_total;
        // Shipping Total
        $this->shipping_taxes = WC()->shipping->shipping_taxes;
        // Shipping Taxes
    }
WC_Cart