Webprecis
    Facebook Twitter Instagram
    Webprecis
    • Home
    • Technology
    • Business
    • Gaming
    • Software
    • Quotes
    • Wallpapers
    Webprecis
    Home»eCommerce»Hide Other WooCommerce Shipping Methods When Free Shipping is Available
    eCommerce

    Hide Other WooCommerce Shipping Methods When Free Shipping is Available

    Simon WalkerBy Simon WalkerUpdated:January 12, 2023No Comments
    Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
    Share
    Facebook Twitter LinkedIn Pinterest Email
    Advertisement

    Free shipping is a fantastic perk for any online buyer and significantly increases the likelihood that they will complete their transaction. WooCommerce offers free shipping as one of its accessible shipping options, but regardless of whether a customer qualifies, it will still show all available shipping alternatives to them. In this article, we will try to explain how to hide other WooCommerce shipping methods when free shipping is available. This can be done in two ways, one is through coding and the other is to use a hide shipping method plugin.

    Hide WooCommerce Shipping Methods with a Code Snippet

    Here, we’ll use an example where, when the Free Shipping option is available for the relevant shipping zone, all shipping options are buried. Use any code snippet plugin to add the following code to the functions.php file of the child theme to do this.

    /**
    
     * Hide shipping methods when free shipping is available.
    Advertisement
    
     *
    
     * @param array $rates Array of rates found for the package.
    
     * @return array
    
     */
    
    function ts_hide_shipping_when_free_is_available( $rates ) {
    
      $free = array();
    
      foreach ( $rates as $rate_id => $rate ) {
    
        if ( ‘free_shipping’ === $rate->get_method_id() ) {
    
          $free[ $rate_id ] = $rate;
    
        }
    
      }
    
      return ! empty( $free ) ? $free : $rates;
    
    }
    
    add_filter( ‘woocommerce_package_rates’, ‘ts_hide_shipping_when_free_is_available’, 100 );

    Hide Other WooCommerce Shipping Methods when Free Shipping is Available with a plugin

    To keep matters simple we will discuss only one plugin in this article to hide WooCommerce shipping methods. The plugin is Add custom shipping icons & hide shipping methods. So let’s discuss in detail how the plugin helps you to hide shipping methods in WooCommerce.

    You can hide WooCommerce shipping methods based on conditions you specify by using the wooCommerce hide shipping method plugin. For instance, you can hide shipping methods depending on product categories and a variety of other criteria or hide delivery ways when free shipping is offered by WooCommerce. The WooCommerce conceal shipping methods plugin is a great tool for streamlining your sales process for various user roles, items, and countries.

    Advertisement

    A great user experience is necessary to boost sales at your online store. You may install the WooCommerce shipping icons plugin to produce icons that are crystal clear and allow your consumers to choose easily. Shop owners can build unique symbols with captions using the WooCommerce shipping icons plugin to make shipping options appealing and understandable. Icons can be personalized with unique graphics or carrier logos.

    Hide WooCommerce Shipping Methods

    hide WooCommerce shipping methods as well as shipping methods added by third-party extensions or developers using the WooCommerce free shipping hide other options plugin. You can use rules you set depending on the following to conditionally hide shipping methods:

    • WooCommerce shipping classes
    • Product SKU
    • WooCommerce product categories
    • Order Weight
    • Order subtotal
    • Countries
    • Postal code
    • User role

    Hide other WooCommerce shipping methods if free shipping is available

    In accordance with the rules you define, the WooCommerce hide shipping if free available plugin enables you to hide all other shipping options when free shipping is offered. When other shipping choices, such as flat rate, and local pickup, satisfy your criteria for free shipping, you can disable them and solely enable free shipping. You may define the conditions for free shipping depending on a variety of variables, including shipping classes, product SKUs, cart subtotals, and much more, using the WooCommerce if free shipping hide other plugin.

    Advertisement
    business online business online marketing
    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
    Simon Walker

      Related Posts

      Marketing January 27, 2023

      Low Traffic From Your YouTube Video AD? Here Are 7 Tactics To Capture The Viewer’s Attention in the First 5 Seconds

      Read More
      Business January 25, 2023

      Trollishly: An Expert Guide For Businesses to Use TikTok

      Read More
      eCommerce January 25, 2023

      How to Organize Your Online Fashion Store

      Read More
      SEO January 21, 2023

      Track Your Website Performance for Maximum Impact

      Read More
      eCommerce December 30, 2022

      Top 10 Benefits of Custom Checkout Fields

      Read More
      eCommerce December 28, 2022

      What Is The Purpose Of The Magento 2 Custom Checkout Fields Extension?

      Read More

      Leave A Reply Cancel Reply

      Subscribe to Updates

      Get the latest creative ideas from Webprecis about art, design and business.

      Facebook Twitter Pinterest LinkedIn
      © 2023 Webprecis | Privacy Policy | Write for Us | Contact Us

      Type above and press Enter to search. Press Esc to cancel.