WC_Shipping_Rate::set_taxes()publicWC 3.2.0

Set rate taxes.

Method of the class: WC_Shipping_Rate{}

No Hooks.

Return

null. Nothing (null).

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.

WC_Shipping_Rate::set_taxes() code WC 9.7.1

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