| @@ -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 ) { |