Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

woocommerce - Woocommerce删除变化表(挂钩,操作)(Woocommerce remove variations table (hook, action))

I want to remove a variations section from single product in woocommerce.

(我想从woocommerce中的单个产品中删除变体部分。)

On this links there are various sections on the single product page which you can enhance or remove.

(在此链接上,可以增强或删除单个产品页面上的各个部分。)

https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/#

(https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/#)

I have not found anywhere where the dropdown variations table or form can be removed using remove_action.

(我找不到在任何地方都可以使用remove_action删除下拉列表或表格的地方。)

I would like to remove Ttitle of variation and the dropdown with options using command in example Example: remove_action( 'woocommerce_before_variations_form', 'woocommerce_single_variation_add_to_cart_button', 20 );

(我想在示例中使用命令删除变体标题和带有选项的下拉列表:remove_action('woocommerce_before_variations_form','woocommerce_single_variation_add_to_cart_button',20);)

Thank you

(谢谢)

  ask by David Salcer translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This solution is working,but does not seem to be right.

(此解决方案有效,但似乎不正确。)

<style>
    div.woocommerce-variation-price, table.variations { display:none; }
</style>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.7k users

...