/** * Change Availability/Stock Messages * **/
add_filter( 'woocommerce_get_availability', 'ebo_custom_get_availability', 1, 2);
function ebo_custom_get_availability( $availability, $_product ) {
// Change Out of Stock Text
if ( ! $_product->is_in_stock() ) {
$availability['availability'] = __('No more stock', 'woocommerce'); //Change "No more stock" to your desired message
}
return $availability;
}
// Change In Stock Text
if ( $_product->is_in_stock() ) {
$availability['availability'] = __('Stuff There!', 'woocommerce'); //Change "Stuff There!" to your desired message
}
- +49 561 9963 9601
- hello@eboosting.net
- Resources
Fachbeitrag: Deine Meinung zählt nicht