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:
commit
5bec3b229f
|
@ -215,9 +215,8 @@ class WC_Structured_Data {
|
||||||
|
|
||||||
if ( '' !== $product->get_price() ) {
|
if ( '' !== $product->get_price() ) {
|
||||||
if ( $product->is_type( 'variable' ) ) {
|
if ( $product->is_type( 'variable' ) ) {
|
||||||
$prices = $product->get_variation_prices();
|
$lowest = $product->get_variation_price( 'min', false );
|
||||||
$lowest = reset( $prices['price'] );
|
$highest = $product->get_variation_price( 'max', false );
|
||||||
$highest = end( $prices['price'] );
|
|
||||||
|
|
||||||
if ( $lowest === $highest ) {
|
if ( $lowest === $highest ) {
|
||||||
$markup_offer = array(
|
$markup_offer = array(
|
||||||
|
|
Loading…
Reference in New Issue