Standard tax class is empty. Fixes #7142
This commit is contained in:
parent
ee8b3f22c3
commit
3590bfb198
|
@ -996,7 +996,7 @@ class WC_API_Orders extends WC_API_Resource {
|
||||||
// if taxable, tax class and total are required
|
// if taxable, tax class and total are required
|
||||||
if ( isset( $fee['taxable'] ) && $fee['taxable'] ) {
|
if ( isset( $fee['taxable'] ) && $fee['taxable'] ) {
|
||||||
|
|
||||||
if ( empty( $fee['tax_class'] ) ) {
|
if ( ! isset( $fee['tax_class'] ) ) {
|
||||||
throw new WC_API_Exception( 'woocommerce_invalid_fee_item', __( 'Fee tax class is required when fee is taxable', 'woocommerce' ), 400 );
|
throw new WC_API_Exception( 'woocommerce_invalid_fee_item', __( 'Fee tax class is required when fee is taxable', 'woocommerce' ), 400 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue