PluginProbe
Tiered Pricing Table for WooCommerce / 2.0
Tiered Pricing Table for WooCommerce v2.0
7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 All 90 releases
← All changes | src/PriceManager.php +2 -8 2.2.22.0 View file →
@@ -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