Skip to content

Commit

Permalink
woocommerce_get_variation_prices_hash array
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Mar 25, 2015
1 parent 0ab0a12 commit 99fcb77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/class-wc-product-variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ public function get_variation_price( $min_or_max = 'min', $display = false ) {
* @return array()
*/
public function get_variation_prices( $display = false ) {
$cache_key = 'var_prices_' . md5( apply_filters( 'woocommerce_get_variation_prices_hash', ( $display ? json_encode( WC_Tax::get_rates() ) : '' ) . WC_Cache_Helper::get_transient_version( 'product' ), $this, $display ) );
$cache_key = 'var_prices_' . md5( json_encode( apply_filters( 'woocommerce_get_variation_prices_hash', array(
$display ? WC_Tax::get_rates() : '',
WC_Cache_Helper::get_transient_version( 'product' )
), $this, $display ) ) );

if ( false === ( $prices_array = get_transient( $cache_key ) ) ) {
$prices = array();
Expand Down

0 comments on commit 99fcb77

Please sign in to comment.