Tidy data
This commit is contained in:
parent
60d8a10bcf
commit
6caa0fab61
|
@ -197,9 +197,11 @@ class WC_Structured_Data {
|
||||||
$permalink = get_permalink( $product->get_id() );
|
$permalink = get_permalink( $product->get_id() );
|
||||||
|
|
||||||
$markup = array(
|
$markup = array(
|
||||||
'@type' => 'Product',
|
'@type' => 'Product',
|
||||||
'@id' => $permalink . '#product', // Append '#product' to differentiate between this @id and the @id generated for the Breadcrumblist.
|
'@id' => $permalink . '#product', // Append '#product' to differentiate between this @id and the @id generated for the Breadcrumblist.
|
||||||
'name' => $product->get_name(),
|
'name' => $product->get_name(),
|
||||||
|
'image' => wp_get_attachment_url( $product->get_image_id() ),
|
||||||
|
'description' => wp_strip_all_tags( do_shortcode( $product->get_short_description() ? $product->get_short_description() : $product->get_description() ) ),
|
||||||
);
|
);
|
||||||
|
|
||||||
$markup['image'] = wp_get_attachment_url( $product->get_image_id() );
|
$markup['image'] = wp_get_attachment_url( $product->get_image_id() );
|
||||||
|
|
Loading…
Reference in New Issue