WC_Order_Item_Fee::set_tax_class()publicWC 1.0

Set tax class.

Method of the class: WC_Order_Item_Fee{}

No Hooks.

Return

null. Nothing (null).

Usage

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

WC_Order_Item_Fee::set_tax_class() code WC 8.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 );
}