I'm seeking assistance with customizing the sale bubble display in WooCommerce. Currently, when a product is on sale, WooCommerce displays a sale bubble indicating the percentage discount (e.g., "20% Off"). However, I want to modify this display to show the actual saved value in pounds (£) instead of the percentage discount.
Here's what I'm trying to achieve:
- When a product is on sale, I want the sale bubble to display the exact amount saved in pounds (£) instead of the percentage discount.
- For example, if the regular price of a product is £100 and the sale price is £70, I want the sale bubble to display "Save £30" instead of "30% Off".
- This modification should apply to both simple and variable products in WooCommerce.
i have option to put placeholder in Customize>Product-catalog:
Sale bubble % formatting How the discount should be displayed. e.g. -{value}%
enter image description here
I've tried implementing solutions found online, such as modifying the sale-flash.php template file and using custom PHP functions in the functions.php file. However, these attempts have been unsuccessful in achieving the desired result.
If you have experience with customizing WooCommerce templates or functions and can assist in implementing this modification, please provide detailed guidance or code snippets to achieve the desired outcome. Your expertise and assistance would be greatly appreciated. Thank you!
Источник: https://stackoverflow.com/questions/781 ... tead-of-pe