WC_Abstract_Order::calculate_shipping()
Calculate shipping total.
Description Description
Return Return
(float)
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();
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.2 | Introduced. |