Fix rich snippets for sale prices. Closes #3470.

This commit is contained in:
Mike Jolley 2013-07-19 15:28:47 +01:00
parent 0b848b8f37
commit 8c57fce84d
1 changed files with 2 additions and 1 deletions

View File

@ -13,8 +13,9 @@ global $post, $product;
?>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p>
<p class="price"><?php echo $product->get_price_html(); ?></p>
<meta itemprop="price" content="<?php echo $product->get_price(); ?>" />
<meta itemprop="priceCurrency" content="<?php echo get_woocommerce_currency(); ?>" />
<link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" />