WC_Abstract_Order::calculate_shipping()

Calculate shipping total.


Description Description


Return Return

(float)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-order.php

	public function calculate_shipping() {
		$shipping_total = 0;

		foreach ( $this->get_shipping_methods() as $shipping ) {
			$shipping_total += $shipping->get_total();
		}

		$this->set_shipping_total( $shipping_total );
		$this->save();

		return $this->get_shipping_total();
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.