Merge pull request #15153 from woocommerce/tweak/15104

Check if subtotal is blank, not empty
This commit is contained in:
Mike Jolley 2017-05-18 16:50:26 +01:00 committed by GitHub
commit 9f4b29a677
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class WC_Order_Item_Product extends WC_Order_Item {
$this->set_prop( 'total', floatval( wc_format_decimal( $value ) ) );
// Subtotal cannot be less than total
if ( ! $this->get_subtotal() || $this->get_subtotal() < $this->get_total() ) {
if ( '' === $this->get_subtotal() || $this->get_subtotal() < $this->get_total() ) {
$this->set_subtotal( $value );
}
}