| @@ -65,12 +65,9 @@ | ||
| 65 | 65 | $type = self::getPricingType( $product_id ); |
| 66 | 66 | if ( $type === 'fixed' ) { |
| 67 | 67 | foreach ( array_reverse( $rules, true ) as $_amount => $price ) { |
| 68 | 68 | if ( $_amount <= $quantity ) { |
| 69 | - return wc_get_price_to_display( wc_get_product( $product_id ), [ | |
| 70 | - 'price' => $price, | |
| 71 | - 'qty' => 1, | |
| 72 | - ] ); | |
| 69 | + return $price; | |
| 73 | 70 | } |
| 74 | 71 | } |
| 75 | 72 | } |
| 76 | 73 | |
| @@ -77,12 +74,9 @@ | ||
| 77 | 74 | if ( $type === 'percentage' ) { |
| 78 | 75 | $product = wc_get_product( $product_id ); |
| 79 | 76 | foreach ( array_reverse( $rules, true ) as $_amount => $percentDiscount ) { |
| 80 | 77 | if ( $_amount <= $quantity ) { |
| 81 | - return wc_get_price_to_display( $product, [ | |
| 82 | - 'price' => self::getPriceByPercentDiscount( $product->get_price(), $percentDiscount ), | |
| 83 | - 'qty' => 1, | |
| 84 | - ] ); | |
| 78 | + return self::getPriceByPercentDiscount( $product->get_price(), $percentDiscount ); | |
| 85 | 79 | } |
| 86 | 80 | } |
| 87 | 81 | } |
| 88 | 82 | |