/* Parodyti nuolaidos dydį prie šalia produkto kainos */

add_filter ('woocommerce_sale_price_html', 'sale_price_html_custom', 20, 2);
function sale_price_html_custom ($html, $product)
{
    $percentage = round (($product->regular_price - $product->sale_price)) / $product->regular_price ) * 100);
    return $html . sprintf ( __(' Nuolaida % ', 'woocommerce'), $percentage . '%');
}