PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
8.0.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 All 91 releases
← All changes | src/Services/RegularPricingService.php +6 -6 6.1.0 → 8.0.2 View file →
@@ -24,9 +24,9 @@
24 24 );
25 25
26 26 public function __construct() {
27 27
28 - // The service should be enabled by addons. This is useful to do not run this services when all pricing addons are disabled
28 + // The service should be enabled by addons. This is useful to do not run those services when all pricing addons are disabled
29 29 if ( ! apply_filters( 'tiered_pricing_table/services/pricing_service_enabled', false ) ) {
30 30 return;
31 31 }
32 32
@@ -147,17 +147,17 @@
147 147 return null;
148 148 }
149 149
150 150 public function adjustPrice( $originalPrice, ?WC_Product $product ) {
151 -
152 - if ( ! TierPricingTablePlugin::isSimpleProductSupported( $product ) ) {
151 +
152 + if ( ! $product ) {
153 153 return $originalPrice;
154 154 }
155 -
156 - if ( ! $product ) {
155 +
156 + if ( ! TierPricingTablePlugin::isSimpleProductSupported( $product ) ) {
157 157 return $originalPrice;
158 158 }
159 -
159 +
160 160 if ( $product->get_meta( 'tiered_pricing_cart_price_calculated' ) === 'yes' ) {
161 161 return $originalPrice;
162 162 }
163 163