Adds offerCount to variable product's structured data
This commit is contained in:
parent
c552d43522
commit
669542ed7d
|
@ -236,6 +236,7 @@ class WC_Structured_Data {
|
||||||
'@type' => 'AggregateOffer',
|
'@type' => 'AggregateOffer',
|
||||||
'lowPrice' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
'lowPrice' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
||||||
'highPrice' => wc_format_decimal( $highest, wc_get_price_decimals() ),
|
'highPrice' => wc_format_decimal( $highest, wc_get_price_decimals() ),
|
||||||
|
'offerCount' => count( $product->get_children() ),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue