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