WC_Tax::find_shipping_rates( array $args = array() )

Searches for all matching country/state/postcode tax rates.


Description Description


Parameters Parameters

$args

(Optional) Args that determine the rate to find.

Default value: array()


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class-wc-tax.php

	public static function find_shipping_rates( $args = array() ) {
		$rates          = self::find_rates( $args );
		$shipping_rates = array();

		if ( is_array( $rates ) ) {
			foreach ( $rates as $key => $rate ) {
				if ( 'yes' === $rate['shipping'] ) {
					$shipping_rates[ $key ] = $rate;
				}
			}
		}

		return $shipping_rates;
	}


Top ↑

User Contributed Notes User Contributed Notes

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