Hello, I am trying to customize the price shown on product archive page. I use the following snippet, which works great:
function custom_price_string_on_archive_pages($price, $product) {
// Check if it’s an archive page (shop or product category/tag)
if (is_archive() || is_shop()) {
// Add “от ” in front of the price
$price = ‘от ‘ . $price;
}
return $price;
}
add_filter(‘woocommerce_get_price_html’, ‘custom_price_string_on_archive_pages’, 10, 2);
It adds “от ” in front of my lower price for variable products. Unfortunately the cyrillic symbols show as “??”. Not sure what might be causing this. Please let me know how I can resolve.
Attachments:
You must be
logged in to view attached files.