删除 woocommerce 简短描述字段 [英] Removing woocommerce short description field

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

问题描述

我正在创建一个专为 woocommerce 使用而设计的主题.此主题的设计不使用产品简短说明".使用以下方法可以很容易地从页面上删除该描述:

I'm creating a theme designed specifically for usage with woocommerce. This theme's design does not utilize the "Product Short Description". Removing that description from displaying on the page was easy enough using:

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

但是,我似乎无法找到任何方法将字段/面板本身从产品编辑页面上的显示内容中删除.如果有人知道如何做到这一点,将不胜感激.需要明确的是,这是较新的 woocommerce 2.0.谢谢!

However, I cannot seem to find any way to remove the field/panel itself from showing to the admin on the product editing pages. If anyone knows how to do that, it would be greatly appreciated. To be clear this is the newer woocommerce 2.0. Thanks!

推荐答案

您可以通过 PHP 从 WooCommerce 管理区域中删除 Short Description 字段:

You can remove the Short Description field from the WooCommerce admin area via PHP:

function remove_short_description() {
     remove_meta_box( 'postexcerpt', 'product', 'normal');
}

add_action('add_meta_boxes', 'remove_short_description', 999);

这篇关于删除 woocommerce 简短描述字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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