Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @petervdeynde,

    If you were to remove the entire area from the products description in WooCommerce this would remove all product functionality from the product and it would be just then like a standard WordPress page?

    That said you could achieve this by editing the WooCommerce plugins template files. The plugins template files can be overridden by copying these to your theme or alternatively you could remove content from the templates using remove_action() functions.

    https://docs.woocommerce.com/document/template-structure/

    Thread Starter petervdeynde

    (@petervdeynde)

    I tried editing the woocommerce template files, but then my sidebar was suddenly below the content box.

    So i restored the template files and achieved the same result by adding the following filters to functions.php file:

    //* remove-tabs-keep-product-description-woocommerce/
    
    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
    
    function woocommerce_template_product_description() {
      woocommerce_get_template( 'single-product/tabs/description.php' );
    }
    add_action( 'woocommerce_single_product_summary', 'woocommerce_template_product_description', 20 );
    
    add_filter('woocommerce_product_description_heading', '__return_null');
    
    remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
    
    //* remove prices from shop and category
    
    add_filter( 'woocommerce_variable_sale_price_html', 'woocommerce_remove_prices', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'woocommerce_remove_prices', 10, 2 );
    add_filter( 'woocommerce_get_price_html', 'woocommerce_remove_prices', 10, 2 );
     
    function woocommerce_remove_prices( $price, $product ) {
    $price = '';
    return $price;
    }
    
    //* remove add to cart button
    
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove area above the description text from single prodcut page’ is closed to new replies.