PluginProbe
Tiered Pricing Table for WooCommerce / 2.2.3
Tiered Pricing Table for WooCommerce v2.2.3
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 +0 -6 2.3.12.2.3 View file →
@@ -69,17 +69,14 @@
69 69 $rules = self::getPriceRules( $product_id );
70 70 $type = self::getPricingType( $product_id );
71 71 if ( $type === 'fixed' ) {
72 72 foreach ( array_reverse( $rules, true ) as $_amount => $price ) {
73 -
74 73 if ( $_amount <= $quantity ) {
75 74 $product_price = wc_get_price_to_display( wc_get_product( $product_id ), [
76 75 'price' => $price,
77 76 'qty' => 1,
78 77 ] );
79 - break;
80 78 }
81 -
82 79 }
83 80 }
84 81
85 82 if ( $type === 'percentage' ) {
@@ -84,17 +81,14 @@
84 81
85 82 if ( $type === 'percentage' ) {
86 83 $product = wc_get_product( $product_id );
87 84 foreach ( array_reverse( $rules, true ) as $_amount => $percentDiscount ) {
88 -
89 85 if ( $_amount <= $quantity ) {
90 86 $product_price = wc_get_price_to_display( $product, [
91 87 'price' => self::getPriceByPercentDiscount( $product->get_price(), $percentDiscount ),
92 88 'qty' => 1,
93 89 ] );
94 - break;
95 90 }
96 -
97 91 }
98 92 }
99 93
100 94 $product_price = ( isset( $product_price ) ? $product_price : false );