WC_Order_Item_Product::set_tax_class()
Set tax class.
Method of the class: WC_Order_Item_Product{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Order_Item_Product = new WC_Order_Item_Product(); $WC_Order_Item_Product->set_tax_class( $value );
- $value(string) (required)
- Tax class.
WC_Order_Item_Product::set_tax_class() WC Order Item Product::set tax class code WC 9.4.2
public function set_tax_class( $value ) { if ( $value && ! in_array( $value, WC_Tax::get_tax_class_slugs(), true ) ) { $this->error( 'order_item_product_invalid_tax_class', __( 'Invalid tax class', 'woocommerce' ) ); } $this->set_prop( 'tax_class', $value ); }