Viewing 9 replies - 1 through 9 (of 9 total)
  • Hey,

    I just did found this out this morning. Also busy working on a site.

    To remove the related products I added this to my functions.php

    remove_action( 'woocommerce_after_single_product_summary',
    'woocommerce_output_related_products', 20 );

    For the additional information tab I just had some info there because of my variations If you go to products > edit a product > properties.

    There you can uncheck: Show on product page.

    Hope this helps!
    (Ps: my shop is in dutch so tried translating it hopefully it will have these names in english)

    Thread Starter jcortes

    (@jcortes)

    I really appreciate the help. The worked worked perfect to remove “related products”. Do you know if there is a way to remove the “additional information” tab with code? I have about 400 products and I’m trying to avoid going one by one, I had code on woocomerce 2.0 that did the job and I would like something similar for woocomerce 2.1. Again, thank you so much.

    Hm, I’m not sure if this works maybe you can try this out:

    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    
    function woo_remove_product_tabs( $tabs ) {
        unset( $tabs['additional_information'] );  
    
        return $tabs;
    
    }

    This goes into your functions.php. Glad to be of help! Figuring it out piece by piece myself^^

    Thread Starter jcortes

    (@jcortes)

    Worked just fine. Thanks for all your @monsterness

    Thanks a million @monsterness just saved my rear big time.

    wich funktion.php file???
    about wich directory we are talking about???

    Roy Ho

    (@splashingpixelscom)

    @mimocloud – your theme’s functions.php file. There is usually only one in the root folder of your theme.

    Hey guys, I just noticed I forgot to tell you or maybe you already know this but,

    When changing your theme always make sure you use your CHILD theme. This is so you keep your changes when upgrading your theme in the future.

    WordPress has a detailed explanation on how to do this. When putting changes in your function.php do not copy the file to your child. Just make a new function.php file in your child theme and put the code in there.

    This his how my child function.php looks

    <?php
    /**
     * Flatsome child functions and definitions
     *
     * @package flatsome
     */
    
    remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
    remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
    if ( is_home() ) {
         remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0);
         }
    remove_action( 'woocommerce_after_single_product_summary',
    'woocommerce_output_related_products', 20 );
    add_filter( 'wc_product_enable_dimensions_display', '__return_false' );
    
    add_filter('woocommerce_get_availability', 'availability_filter_func');
    
    ?>

    As you can see it only contains the code I added. The rest of the file get taken from the original theme file. Maybe you already know this but it’s also for future people seeing this ! If I explained it poorly or have any questions do ask.

    Happy coding.

    I was able to successfully remove the related products info at the bottom of my store pages…but I’m not able to get rid of the words, “Related Products.” It’s so strange. Any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Disable (remove) "related products" woocommerce 2.1.2’ is closed to new replies.