Merge branch 'feature/admin-apply-discount-15501' into feature/coupon-remove

This commit is contained in:
Mike Jolley 2017-08-10 11:25:21 +01:00
commit 2a4a078266
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ final class WC_Cart_Totals {
*/
protected function get_discounted_price_in_cents( $item_key ) {
$item = $this->items[ $item_key ];
$price = $item->subtotal - $this->discount_totals[ $item_key ];
$price = isset( $this->discount_totals[ $item_key ] ) ? $item->subtotal - $this->discount_totals[ $item_key ] : $item->subtotal;
if ( $item->price_includes_tax ) {
$price += $item->subtotal_tax;