[英]wooCommerce display Attribute description on single product page
Hey there guys I'm developing for www.911quotes.com and on our single products page we would like to show the attributes description under the checkout button. 嘿,我正在为www.911quotes.com开发人员,在我们的单一产品页面上,我们想在结帐按钮下显示属性说明。
Any help on how to get this done would be great. 如何完成这项工作的任何帮助都会很棒。 I have been searching and searching. 我一直在搜寻。 We are using WooCommerce and I can't seem to figure this one out. 我们正在使用WooCommerce,但我似乎无法弄清楚这一点。
Normally you wouldn't see the "Checkout" button on the Single Products page - you'd see the "Add to Cart" button! 通常,您不会在“单一产品”页面上看到“结帐”按钮-您会看到“添加到购物车”按钮! Assuming that's what you mean, you can hook into this area as follows: 假设这就是您的意思,则可以按如下所示进入该区域:
// Hook below Add to Cart Button
add_action( 'woocommerce_after_add_to_cart_button', 'pgwp_woocommerce_after_add_to_cart_button');
function pgwp_woocommerce_after_add_to_cart_button () {
echo '<div id="msg-after-add-button" style="clear:both"><p>Hello World!</p></div>';
}
Not sure what you mean by "the attributes description". 不确定“属性描述”是什么意思。 I think this is the answer you need for that: Woocommerce getting custom attributes 我认为这是您需要的答案: Woocommerce获取自定义属性
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.