Add URL field

This commit is contained in:
Mike Jolley 2019-03-04 12:47:31 +00:00
parent 6caa0fab61
commit 52533d9da6
1 changed files with 1 additions and 0 deletions

View File

@ -200,6 +200,7 @@ class WC_Structured_Data {
'@type' => 'Product',
'@id' => $permalink . '#product', // Append '#product' to differentiate between this @id and the @id generated for the Breadcrumblist.
'name' => $product->get_name(),
'url' => $permalink,
'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() ) ),
);