Created
May 11, 2016 19:13
-
-
Save BFTrick/69f91482b0494344cdfa64e1855d5e76 to your computer and use it in GitHub Desktop.
WooCommerce Price Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 esc_attr( $product->get_price() ); ?>" /> | |
<meta itemprop="priceCurrency" content="<?php echo esc_attr( get_woocommerce_currency() ); ?>" /> | |
<link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" /> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment