PluginProbe
Tiered Pricing Table for WooCommerce / 2.2.2
Tiered Pricing Table for WooCommerce v2.2.2
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/Frontend/CartPriceManager.php +2 -9 2.2.32.2.2 View file →
@@ -41,13 +41,9 @@
41 41 public function calculateTotals( $cart ) {
42 42
43 43 if ( ! empty( $cart->cart_contents ) ) {
44 44 foreach ( $cart->cart_contents as $key => $cart_item ) {
45 -
46 - $needPriceRecalculation = apply_filters( 'tier_pricing_table/cart/need_price_recalculation', true, $cart_item );
47 -
48 - if ( $cart_item['data'] instanceof WC_Product && $needPriceRecalculation ) {
49 -
45 + if ( $cart_item['data'] instanceof WC_Product ) {
50 46 $product_id = ! empty( $cart_item['variation_id'] ) ? $cart_item['variation_id'] : $cart_item['product_id'];
51 47
52 48 $new_price = PriceManager::getPriceByRules( $cart_item['quantity'], $product_id );
53 49
@@ -72,12 +68,9 @@
72 68 *
73 69 * @return string
74 70 */
75 71 public function calculateItemPrice( $price, $cart_item ) {
76 -
77 - $needPriceRecalculation = apply_filters( 'tier_pricing_table/cart/need_price_recalculation/item', true, $cart_item );
78 -
79 - if ( $cart_item['data'] instanceof WC_Product && $needPriceRecalculation ) {
72 + if ( $cart_item['data'] instanceof WC_Product ) {
80 73
81 74 $new_price = PriceManager::getPriceByRules( $cart_item['quantity'], $cart_item['data']->get_id() );
82 75
83 76 // To get real product price