Merge pull request #5931 from splashingpixels/rich-snippets

corrected currency rich snippets for price
This commit is contained in:
Mike Jolley 2014-07-30 12:17:21 +01:00
commit 5d2833bc33
1 changed files with 5 additions and 3 deletions

View File

@ -7,16 +7,18 @@
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
global $post, $product;
global $product;
?>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<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(); ?>" />
<meta itemprop="currency" content="<?php echo get_woocommerce_currency(); ?>" />
<link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" />
</div>