Merge branch 'pr/9628'

This commit is contained in:
Mike Jolley 2015-11-27 13:00:39 +00:00
commit 75529edbe5
1 changed files with 5 additions and 3 deletions

View File

@ -249,9 +249,11 @@ class WC_Product_Variable extends WC_Product {
$price_hash = array( false );
}
foreach ( $wp_filter as $key => $val ) {
if ( in_array( $key, array( 'woocommerce_variation_prices_price', 'woocommerce_variation_prices_regular_price', 'woocommerce_variation_prices_sale_price' ) ) ) {
$price_hash[ $key ] = $val;
$filter_names = array( 'woocommerce_variation_prices_price', 'woocommerce_variation_prices_regular_price', 'woocommerce_variation_prices_sale_price' );
foreach ( $filter_names as $filter_name ) {
if ( ! empty( $wp_filter[ $filter_name ] ) ) {
$price_hash[ $filter_name ] = $wp_filter[ $filter_name ];
}
}