function custom_get_availability( $availability, $_product ) {
//change text "In Stock' to 'SPECIAL ORDER'
if ( $_product->is_in_stock() ) $availability['availability'] = __('AVAILABLE', 'woocommerce');
//change text "Out of Stock' to 'SOLD OUT'
if ( !$_product->is_in_stock() ) $availability['availability'] = __('SOLD', 'woocommerce');
return $availability;
is someone have an idea why this doesn't work anymore?
The code (functions) is not in complete state, it is missing out the "wordpress filters" functions, can you tell me the original source of this fix you have applied so I can test in my copy and let you know how to fix that?
Hi,
i updated Kalium + my woocommerce to 2.6.2 to 2.6.4
and some functions in my function.php fils seems not working anymore
this that display SOLD instead of out of stock on my theme
!! Only visible at the moment on my clone https://commonplaces-dev-commonplace_wpserver.pf3.wpserveur.net/product-category/artists/anna-zuber/
is someone have an idea why this doesn't work anymore?
Thanks
Hi Silvia,
The code (functions) is not in complete state, it is missing out the "wordpress filters" functions, can you tell me the original source of this fix you have applied so I can test in my copy and let you know how to fix that?