Your account expired support, please renew to get your support.

Home Forums Themes Support Gecko Hide out of stock size

Viewing 4 reply threads
  • Author
    Posts
    • #40402
      robroy
      Support Expired

      I’ve set up variations in the form of sizes, but the size buttons are still visible depsite being out of stock. How can I hide variations not in stock?

       

      Thank you

    • #40405
      Harry
      Support Expired

      Hi Robroy,

      1. Please try add below code to gecko-child > functions.php

      ‘add_filter( ‘woocommerce_variation_is_active’, ‘njengah_grey_out_variations_out_of_stock’, 10, 2 );

      function njengah_grey_out_variations_out_of_stock( $is_active, $variation ) {
      if ( ! $variation->is_in_stock() ) return false;
      return $is_active;

      }`

      follow this topic https://njengah.com/woocommerce-hide-out-of-stock-variations/

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #40408
      robroy
      Support Expired

      It’s hiding the “out of stock” text, but not the variation itself.

      Before adding the code:
      https://prnt.sc/z7il46

      After adding the code:
      https://prnt.sc/z7iiah

      • This reply was modified 3 years, 2 months ago by robroy.
    • #40410
      Harry
      Support Expired

      I’m sorry WooCommerce doesn’t support hide separate variation out of stock.

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #40446
      robroy
      Support Expired

      Is there a way to blackout or change the color of the out of stock items?

Viewing 4 reply threads

You must be logged in to reply to this topic.