diff --git a/includes/class-wc-structured-data.php b/includes/class-wc-structured-data.php index b7fd9509109..fcd04ff7c46 100644 --- a/includes/class-wc-structured-data.php +++ b/includes/class-wc-structured-data.php @@ -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(