Allow set tax class as "parent"

This commit is contained in:
Claudio Sanches 2016-11-11 14:46:51 -02:00
parent c8e34f3403
commit 518c3a3467
1 changed files with 1 additions and 5 deletions

View File

@ -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.