更新时间:2023-12-06 08:47:46
这是我在 Woocommerce 关于移除购物车功能的经验.我在我的 Virtue 主题中的 functions.php 中添加了这段代码.
this is my experienced with Woocommerce about remove carts function. I added this code in functions.php in my Virtue themes.
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
remove_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
在本网站中,我使用了该代码.我希望这可以解决您的问题.谢谢:)
In this Web I used that code. I Hope that's can solve your probelms. Thank you :)