Hello @govisola,
Is that important the fact that I use Astra? Or these codes from all your links can be used for every theme?
If you go with a CSS-based solution, then no, your theme shouldn’t have an influence. :?)
To hide it, simply add the following snippet via a plugin like Simple Custom CSS and JS.
/* Hide sale badge */
.onsale {
display: none !important;
}
And, the moment I add the code and save it, how can I find easily that code if something goes wrong to delete it?
You can label the snippet in the mentioned plugin to easily spot it in the future.
I want to delete that “on sale” message and add another word I like better or automatically want to add the percent of the discount (like -10%).
You can modify the “On Sale” badge text using a translation plugin like Loco Translate. Here’s a helpful guide for reference: https://justabill.blog/how-to-change-woocommerce-text-using-loco-translate/comment-page-1/
However, changing the text dynamically based on factors like sale percentage would require a custom solution, which unfortunately falls outside the scope of support.
If you’d like assistance from a developer for this customization, consider exploring our list of vetted WooExpert agencies here.
Hope this helps!