【发布时间】:2016-09-24 12:06:42
【问题描述】:
我想添加更多信息/更新 woocommerce 中的结帐表。这是我的意思的表:
我想编辑产品的数量和标题。
我查看了 woocommerce 钩子并发现了以下内容:
woocommerce_checkout_cart_item_quantit
于是我做了一个测试函数来玩玩:
function add_meta_on_checkout_order_review_item( $quantity , $cart_item , $cart_item_key ) {
echo $cart_item[ 'quantity' ] + 5;
}
add_filter( 'woocommerce_checkout_cart_item_quantity', 'add_meta_on_checkout_order_review_item', 1, 3 );
但这没有任何效果。我是否加入了正确的 woocommerce 钩子?
【问题讨论】:
标签: woocommerce hook checkout