[英]WooCommerce cart hook 'woocommerce_cart_contents' displaying content in the wrong position
I am trying to add content below the cart items and above the 'Apply Coupon' and 'Update Cart' buttons.我正在尝试在购物车项目下方和“应用优惠券”和“更新购物车”按钮上方添加内容。
I am using the action hook woocommerce_cart_contents
.我正在使用动作挂钩
woocommerce_cart_contents
。
add_action('woocommerce_cart_contents', 'add_content');
function add_content(){
echo 'The content';
}
The echoed text is being displayed above the cart table.回显的文本显示在购物车表上方。
I have tested this on two different websites and found the same issue.我在两个不同的网站上对此进行了测试,发现了同样的问题。 Any idea where I am going wrong?
知道我哪里出错了吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.