• Resolved velivalanni423

    (@velivalanni423)


    Hey, I would like to change the visibility of our products variations on the product page. I use elementor but there is no possiblity to do so. I found a code in google to change my function.php and grey out the items but the crosses turn red, I would like to have them black or only grey out. What can I do?

    This is the code I’ve used:

    add_filter( 'woocommerce_variation_is_active', 'grey_out_variations_when_out_of_stock', 10, 2 ); function grey_out_variations_when_out_of_stock( $grey_out, $variation ) { if ( ! $variation->is_in_stock() ) return false; return true; }`

    • This topic was modified 2 years, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change visibility of out of stock items in WooCommerce’ is closed to new replies.