I’m trying to move “in stock” just underneath the price rather than after the product short description.
What I don’t get is that on my wp-content/plugins/woocommerce/templates/single-product/price.php
.
The code seems to do just that :
<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'; ?>" />
But when I’m on my product page, the description somehow comes in between :
http://www.taldeak.fr/shop/rugby/pays-de-galles-france-cardiff-26-28-fevrier-2016
I know it’s in French but basically price and stock are the only two infos in green. FYI, I’m using the WooCommerce – Gravity Forms Product Add-Ons, in case it’s relevant.
If anyone could help, it would be great !!
Thanks in advance,
G
You have moved your link tag for the
itemprop="availablity"
, which is showing in the html within theitemprop="offers"
however you have not moved the actual stock html that is contained within<p class="stock in-stock">
This is the current content around the code you provided
Edit: The stock status is included in two places, depending on whether it is a simple or grouped product:
wp-content/plugins/woocommerce/templates/single-product/add-to-cart/simple.php
line 22wp-content/plugins/woocommerce/templates/single-product/add-to-cart/grouped.php
line 62