Hello,
I used this code in my Child Theme functions file to change “out of stock” to “Sold out or allocated to club” on my indiv prod pages but it does not seem to drive the little pop up flag on the catalog page and I can’t quite figure out what does. Any chance you could help me out?
/**
* Change Out of Stock Text
*/
add_filter( ‘woocommerce_get_availability’, ‘wcs_custom_get_availability’, 1, 2);
function wcs_custom_get_availability( $availability, $_product ) {
// Change Out of Stock Text
if ( ! $_product->is_in_stock() ) {
$availability[‘availability’] = __(‘Sold Out or Allocated to Club’, ‘woocommerce’);
}
return $availability;
}
Thanks in advance,
Katie