woocommerce 产品显示两个“添加到购物车";响应式移动/平板电脑视图上的按钮? [英] woocommerce product showing two "Add to Cart" button on responsive mobile/tablet view?
本文介绍了woocommerce 产品显示两个“添加到购物车";响应式移动/平板电脑视图上的按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 woocommerce 插件,它在桌面视图上显示产品详细信息是正确的,但是当我打开移动视图或平板电脑(即响应式)视图时,它会显示一个产品的两个添加到购物车"按钮.
I am using woocommerce plugin, It is showing products details on desktop view is correct but when i switch on mobile view or tablet(i.e. responsive) view then it shows two "Add to Cart" button for one product.
推荐答案
如果有人为此苦苦挣扎,请将此代码添加到 wordpress > wp-content > plugins > woocommerce.php在函数 WC() 中返回 WooCommerce::inherit();
If someone is struggeling with this, add this code to wordpress > wp-content > plugins > woocommerce.php in function WC() right before return WooCommerce::inherit();
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
这将删除按钮.
这篇关于woocommerce 产品显示两个“添加到购物车";响应式移动/平板电脑视图上的按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文