From 8b96122f286d1564cb03776516c0378162f1efac Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Fri, 11 Nov 2016 14:46:51 -0200 Subject: [PATCH] Allow set tax class as "parent" --- includes/api/class-wc-rest-products-controller.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/api/class-wc-rest-products-controller.php b/includes/api/class-wc-rest-products-controller.php index eec05b642f6..e1dcc3483e8 100644 --- a/includes/api/class-wc-rest-products-controller.php +++ b/includes/api/class-wc-rest-products-controller.php @@ -1583,11 +1583,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller { // Tax class. if ( isset( $data['tax_class'] ) ) { - if ( 'parent' !== $data['tax_class'] ) { - $variation->set_tax_class( $data['tax_class'] ); - } else { - $variation->set_tax_class( '' ); - } + $variation->set_tax_class( $data['tax_class'] ); } // Description.