我打算向某人提供一个woocommerce商店,我想隐藏所有必要的选项,以免混淆非高级用户.特别是产品类型.
在WooCommerce产品编辑器中,可以选择产品类型.我只想展示简单和可变的产品.
通常这可以使用css display:hide属性来完成,但是当我检查woocommerce产品选项时,选项没有id或类选择器.
这是我在产品选项上看到的代码
我的问题.有没有办法在一个选项框中隐藏分组产品和联盟产品类型,以便在woocommerce或wp更新期间不会受到影响?
谢谢
你可以过滤 product_type_selector
add_filter( 'product_type_selector', 'remove_product_types' ); function remove_product_types( $types ){ unset( $types['grouped'] ); unset( $types['external'] ); return $types; }