Skip to content

Commit

Permalink
Fixes reset cache and version assignment for variable product prices
Browse files Browse the repository at this point in the history
Fixes woocommerce#11812

$this->array was only used to return to the user. Comparison was done with $prices_array, which did not contain the version information because it was never saved in the transient.
  • Loading branch information
javorszky committed Aug 31, 2016
1 parent 335a5e2 commit 9cfa231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wc-product-variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public function get_variation_prices( $display = false ) {

// If the product version has changed, reset cache
if ( empty( $prices_array['version'] ) || $prices_array['version'] !== WC_Cache_Helper::get_transient_version( 'product' ) ) {
$this->prices_array = array( 'version' => WC_Cache_Helper::get_transient_version( 'product' ) );
$prices_array = array( 'version' => WC_Cache_Helper::get_transient_version( 'product' ) );
}

// If the prices are not stored for this hash, generate them
Expand Down

0 comments on commit 9cfa231

Please sign in to comment.