如何从 Wordpress 的 WooCommerce 插件中删除购物车? [英] How to remove shopping cart from WooCommerce plugin in Wordpress?

查看:42
本文介绍了如何从 Wordpress 的 WooCommerce 插件中删除购物车?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Wordpress 中使用 Virtue 主题并安装了 WooCommerce 插件来设置我的在线商店.我想完全删除购物车功能,而是在单个产品页面上放置订单.正在寻求帮助以移除购物车.

I'm using the Virtue Theme in Wordpress and have installed the WooCommerce plugin for setting up my online store. I want to remove the shopping cart function completely and instead place an order form on individual product page. Help is sought to remove the shopping cart.

推荐答案

这是我在 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 :)

这篇关于如何从 Wordpress 的 WooCommerce 插件中删除购物车?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆