Home Forums Themes Support Gecko Hide out of stock size

Viewing 4 reply threads
  • Author
    Posts
    • #40402
      robroy
      Supported

      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
      Supported

      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
      Supported

      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 1 week, 6 days ago by robroy.
    • #40410
      Harry
      Supported

      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
      Supported

      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.