WordPress at Your Fingertips
function is not described

WC_Order_Item_Fee::set_tax_class() public WC 1.0

Set tax class.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Order_Item_Fee = new WC_Order_Item_Fee();
$WC_Order_Item_Fee->set_tax_class( $value );
$value(string) (required)
Tax class.

Code of WC_Order_Item_Fee::set_tax_class() WC 5.9.0

public function set_tax_class( $value ) {
	if ( $value && ! in_array( $value, WC_Tax::get_tax_class_slugs(), true ) ) {
		$this->error( 'order_item_fee_invalid_tax_class', __( 'Invalid tax class', 'woocommerce' ) );
	}
	$this->set_prop( 'tax_class', $value );
}