This topic has 11 replies, 5 voices, and was last updated 9 years, 7 months ago ago by Brian Johnson
Hello
How can I translate the “Out of stock” label on the product image please?
I have succeeded to change the “New” label via the .po translation file but it does not work with “Out of stock” and maybe not with “Sale”.
Thx
Hello,
You can translate “Out of stock” in \woopress\woocommerce\loop\sale-flash.php file.
Regards,
Robert Hall.
Hello Robert
Thank you for your help.
Another question please: how can I change the size of the font for the “out of stock” label? I guess it is in the CSS file but which one…?
Thx
Hello,
Please add this code in custom.css file:
.out-stock .wr-c {
font-size: 10px;
}
.out-stock .wr-c .bigT {
font-size: 10px;
}
Thank you.
Regards,
Eva Kemp.
Thank you
Hello,
You’re welcome!
Regards,
Robert Hall.
Hi, my \woopress\woocommerce\loop\sale-flash.php doesnt have any “out of stock” label. This is the content of that file below. How do I change “out of stock” to “purchased”? eg. the “out of stock” label over the product at http://littletreasuresregistry.com.au/product-category/clothing/
———————————
<?php
/**
* Product loop sale flash
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
if ( ! defined( ‘ABSPATH’ ) ) {
exit; // Exit if accessed directly
}
global $post, $product;
?>
<?php if ( $product->is_on_sale() ) : ?>
<?php echo apply_filters( ‘woocommerce_sale_flash’, ‘<span class=”onsale”>’ . __( ‘Sale!’, ‘woocommerce’ ) . ‘</span>’, $post, $product ); ?>
<?php endif; ?>
————————————————
Thanks so much!
Hello @Katya,
Please check it attentively. The text is written in the file wp-content/themes/woopress/woocommerce/loop/sale-flash.php on line 32.
If you still can’t find it please provide us with FTP credentials.
Thank you.
Regards,
Eva Kemp.
Thanks eva, still couldnt see it. i ended up finding it on contact-product.php
I think it fixed it.
Thank you 🙂
Katya
Hello
You are welcome! We are glad that you have found the solution.
With best regards
Brian Johnson
The issue related to '‘Translate the "Out of stock" label’' has been successfully resolved, and the topic is now closed for further responses