Home › Forums › Basel support forum › Change Label Sold Out to Out Of Stock
Change Label Sold Out to Out Of Stock
- This topic has 5 replies, 2 voices, and was last updated 3 years, 8 months ago by Elise Noromit.
-
AuthorPosts
-
March 17, 2021 at 1:47 pm #274345
Usman AliParticipantHi,
I want to change “Sold Out” label to “Out Of Stock”.
How can we do that?
Screenshot attached.
ThanksAttachments:
You must be logged in to view attached files.March 17, 2021 at 6:58 pm #274414
Elise NoromitMemberHello,
You can translate/rewrite all theme and plugin texts via PO file in WordPress. Here is a video tutorial that should help you translate your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3
Please check the video tutorial to see how to save the translation file correctly. You can remove the plugin and translations would remain. Also, translations would remain after each theme update.
Best Regards
March 19, 2021 at 3:44 pm #274925
Usman AliParticipantHi,
It’s not about the translation. I need to change the out of stock label.
When the product is out of stock label comes on product SOLD OUT.
I want it to be OUT OF STOCK.Check attached screen shot.
ThanksAttachments:
You must be logged in to view attached files.March 19, 2021 at 6:14 pm #274952
Elise NoromitMemberHello,
You need to create the same translation as your site language is. Then change the string as per your needs. Loco is the only way to change the wording.
Best Regards
March 20, 2021 at 1:49 pm #275099
Usman AliParticipantHi,
Can we change this in codding? Like can we add this code.
Can you tell me where I can find code ‘woocommerce_get_availability’?add_filter( ‘woocommerce_get_availability’, ‘wcs_custom_get_availability’, 1, 2);
function wcs_custom_get_availability( $availability, $_product ) {// Change Out of Stock Text
if ( ! $_product->is_in_stock() ) {
$availability[‘availability’] = __(‘Sold Out’, ‘woocommerce’);
}
return $availability;
}Thanks
March 20, 2021 at 8:40 pm #275147
Elise NoromitMemberHello,
Sold out label is the Woocommerce functionality, our support does not cover customization of the plugins, our support relates to these issues only.
Even though you customize the code it would be lost during the plugin update. The only safe way requiring one-time plugin using is translating by means of Loco plugin, you can install, rewrite as per your needs and then delete the plugin the change would remain forever.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register