删除 Woocommerce 产品简短说明 [英] Remove Woocommerce Product Short Description

查看:39
本文介绍了删除 Woocommerce 产品简短说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试删除 Woocommerce 中单个产品页面上显示的产品简短描述.默认情况下,它位于价格正下方,我希望它完全消失.

I'm trying to remove the Product Short Description showed on a Single Product Page in Woocommerce. By default it's placed right underneath the price, I want it totally gone.

我尝试使用此代码:remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20); 并放置在我的 Child 主题文件夹的 functions.php 中,但它没有改变任何内容.

I tried to use this code: remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20); and placed in functions.php of my Child theme folder but it doesn't change anything.

如果我尝试 woocommerce_template_single_add_to_cartwoocommerce_template_single_meta 看看这段代码是否真的有效,它会删除添加到购物车按钮和产品元数据,但由于某种原因,摘录是t 受影响.

If I try woocommerce_template_single_add_to_cart or woocommerce_template_single_meta to see if the piece of code actually works it removes the add to cart button and product meta but for some reason the excerpt isn't affected.

还有其他解决方案可以删除它吗?谢谢!!约斯特

Any other solutions to remove it? Thanks!! Joost

推荐答案

正确的代码片段发布在这里:如何在wordpress的单个产品页面中删除wordpress的简短描述选项卡?

The right snippet is posted here: How to remove wordpress Short description tab in single product page in wordpress?

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );

function woocommerce_template_single_excerpt() {
        return;
}

这篇关于删除 Woocommerce 产品简短说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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