Last active
August 29, 2015 14:27
-
-
Save vladimirlukyanov/f8660e53368b9439b333 to your computer and use it in GitHub Desktop.
Rename availability name of WooCommerce titles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function backorder_text($available) { | |
foreach ($available as $key => $i) { | |
$available[$key] = str_replace('In stock', 'In stock and shipping!', $available[$key]); | |
$available[$key] = str_replace('Out of stock', 'Sold out', $available[$key]); | |
} | |
return $available; | |
} | |
add_filter('woocommerce_get_availability', 'backorder_text', 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment