Background of the issue:
I am trying to add a filter in functions.php to change the in-stock text for WooCommerce products. The code I used is: add_filter('woocommerce_get_availability', 'ecommercehints_change_in_stock_text', 10, 2); function ecommercehints_change_in_stock_text($availability, $product) { if ($product->is_in_stock()) { $availability['availability'] = __('Auf Lager - in 1-3 Tagen bei Dir', 'woocommerce'); } return $availability; } I want to translate 'Auf Lager - in 1-3 Tagen bei Dir' but cannot find it via String Translation. The issue can be seen at: lien caché
Symptoms:
I expected to see the string 'Auf Lager - in 1-3 Tagen bei Dir' in String Translation, but instead, I got: NO STRING.
Questions:
Why can't I find the string 'Auf Lager - in 1-3 Tagen bei Dir' in String Translation?
How can I translate the custom in-stock text in WooCommerce?