Woocommerce添加功能以在购物车中显示商品后运行


Woocommerce add function to run after display items in cart

我想在商品列表后的购物车页面中显示消息。但我想通过钩子/函数添加它,而不是编辑购物车页面。找不到确切的操作方法。但它可能看起来像这样:

add_action( 'print_cart', 'add_some_message' );
function add_some_message() {
     add_meta_box( 'message_title', 'message title', 'after' );
}

它只是一个例子,不熟悉woo功能。

谢谢。

感谢高拉夫·库马尔,我在这里找到了 http://docs.woothemes.com/document/hooks/钩子。我正在寻找的是:

my_function(){
     // my code to add after cart
}
add_action('woocommerce_after_cart_contents', 'my_function');

除woocommerce_after_cart_contents外,还有:woocommerce_after_cart_table、woocommerce_after_cart_totals woocommerce_after_cart。每个人都在购物车的不同部分起作用。我正在写答案,以防有人有同样的问题。