WooCommerce Remove Availability/In Stock From Single Product Page

Friday, January 17, 2014 10:23 AM By Admin , In

Use following code to remove availability/in stock from single product page.

Method:

  1. Copy code to your functions.php.

/* Remove availability */
add_filter( 'woocommerce_get_availability', 'bas_get_availability', 1, 2);
function bas_get_availability($availability,$_product){
 global $product;
 if($_product->is_in_stock()){
  $availability['availability'] = __('', 'woocommerce');
 }
 return $availability;
}

1 comments:

Unknown said...
This comment has been removed by the author.
December 9, 2016 at 6:52 AM

Post a Comment