PluginProbe
Tiered Pricing Table for WooCommerce / 8.1.0
Tiered Pricing Table for WooCommerce v8.1.0
8.1.0 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 All 92 releases
← All changes | src/Core/Cache.php +4 -1 8.0.2 → 8.1.0 View file →
@@ -87,9 +87,12 @@
87 87 return $this->variableProductsHashes[ $product->get_id() ];
88 88 }
89 89 }
90 90
91 - return md5( $product->get_date_modified() . implode( ',', TierPricingTablePlugin::getCurrentUserRoles() ) );
91 + // add-ons whose pricing changes without the product changing (scheduled global rules, for instance) salt the key
92 + $salt = (string) apply_filters( 'tiered_pricing_table/cache/product_cache_key_salt', '', $product );
93 +
94 + return md5( $product->get_date_modified() . implode( ',', TierPricingTablePlugin::getCurrentUserRoles() ) . $salt );
92 95 }
93 96
94 97 public function getProductData( WC_Product $product, $key = null ) {
95 98 if ( ! $this->isEnabled ) {