Check for parent value - fixes tax class

This commit is contained in:
Mike Jolley 2016-11-11 16:22:51 +00:00
parent e1c4c4ab96
commit 4600ccd146
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ class WC_Product_Variation extends WC_Product_Simple {
$value = $this->get_prop( 'tax_class', $context );
// Inherit value from parent.
if ( 'view' === $context && empty( $value ) ) {
if ( 'view' === $context && 'parent' === $value ) {
$value = $this->parent_data['tax_class'];
}
return $value;