Merge pull request #19527 from woocommerce/fix/19519

Use `get_variation_price` method in structured data to grab min/max so filters are ran.
This commit is contained in:
Claudio Sanches 2018-03-28 15:23:14 -03:00 committed by GitHub
commit 5bec3b229f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -215,9 +215,8 @@ class WC_Structured_Data {
if ( '' !== $product->get_price() ) {
if ( $product->is_type( 'variable' ) ) {
$prices = $product->get_variation_prices();
$lowest = reset( $prices['price'] );
$highest = end( $prices['price'] );
$lowest = $product->get_variation_price( 'min', false );
$highest = $product->get_variation_price( 'max', false );
if ( $lowest === $highest ) {
$markup_offer = array(