WC_Shipping_Method::get_rates_for_package( array $package )

Return calculated rates for a package.


Description Description


Parameters Parameters

$package

(Required) Package array.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-shipping-method.php

	public function get_rates_for_package( $package ) {
		$this->rates = array();
		if ( $this->is_available( $package ) && ( empty( $package['ship_via'] ) || in_array( $this->id, $package['ship_via'] ) ) ) {
			$this->calculate_shipping( $package );
		}
		return $this->rates;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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