WordPress at Your Fingertips
function is not described

WC_Shipping_Rate::set_taxes() public WC 3.2.0

Set rate taxes.

{} It's a method of the class: WC_Shipping_Rate{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Shipping_Rate = new WC_Shipping_Rate();
$WC_Shipping_Rate->set_taxes( $taxes );
$taxes(array) (required)
List of taxes applied to shipping rate.

Changelog

Since 3.2.0 Introduced.

Code of WC_Shipping_Rate::set_taxes() WC 5.6.0

public function set_taxes( $taxes ) {
	$this->data['taxes'] = ! empty( $taxes ) && is_array( $taxes ) ? $taxes : array();
}