How to remove woocommerce tab?

前端 未结 6 1137
[愿得一人]
[愿得一人] 2021-01-11 18:51

the products in our woocommerce shop don\'t need any of the default tabs so I have managed to disable them being that I only need to have the product description below the p

6条回答
  •  一个人的身影
    2021-01-11 19:33

    Excuse me but the question is not only removing tabs but also keeping the product description. If you ever tried the code above you would realize that while removing tabs you are actually removing the product description. And this is not the desired case.

    You should somewhere add the following code to add it back. But unfortunately this time you can add the description side by side the picture and making a narrow column. I couldn't find the solution to add it nicely below the picture where the tabs existed before. The code:

    function woocommerce_template_product_description() {
        woocommerce_get_template( 'single-product/tabs/description.php' );
    }
    
    add_action( 'woocommerce_single_product_summary',  'woocommerce_template_product_description', 40 );
    

提交回复
热议问题