Skip to content

Instantly share code, notes, and snippets.

@kharissulistiyo
Created November 18, 2015 01:48
Show Gist options
  • Save kharissulistiyo/a62f950448b270f823fc to your computer and use it in GitHub Desktop.
Save kharissulistiyo/a62f950448b270f823fc to your computer and use it in GitHub Desktop.
WooCommerce display product stock availability status without managing stock level
<?php
add_filter('woocommerce_get_availability', 'my_availability_message', 10, 2);
function my_availability_message($args, $product){
$args = array(
'availability' => __('Always Available', 'textdomain'),
'class' => 'always-available'
);
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment