1
我试图将变体描述的位置移动到WooCommerce网站上的添加到购物车按钮下方。我注意到,(不像变化产品的所有其他部分),它使用的是JS模板:WooCommerce移动变体描述
<script type="text/template" id="tmpl-variation-template">
<div class="woocommerce-variation-description">
{{{ data.variation.variation_description }}}
</div>
<div class="woocommerce-variation-price">
{{{ data.variation.price_html }}}
</div>
<div class="woocommerce-variation-availability">
{{{ data.variation.availability_html }}}
</div>
</script>
<script type="text/template" id="tmpl-unavailable-variation-template">
<p><?php _e('Sorry, this product is unavailable. Please choose a different combination.', 'woocommerce'); ?></p>
</script>
然而,当我试图走动的代码模板中,它只是停留在完全相同的地方即使我已将它放在添加到购物车按钮后。
而且我也尝试了here和here的钩子代码,但这些也都失败了(我怀疑WooCommerce 3和更高版本中的某些东西已经改变了,我正在使用它)。任何人都知道如何移动变体描述?
感谢您的回应,我很感激。我希望有一个我可以使用的钩子,但如果没有其他人回应,或者我在其他地方找不到,我会放弃。 – Stephen
有可能是一个钩子,但不幸的是,自从3.x它很难找到有关WooCommerce的一些很好的答案。时间会做的事情;) – bkseen