If you like our themes and support, please SHARE our website! https://theme-sky.com/wordpress-themes/

Okay
  Public Ticket #1527613
add word "price" before the number price
Closed

Comments

  • Slobodan started the conversation

    hi ,

    i need to add a word "cena:" before the number price, 

    http://prntscr.com/j0c3sv

    http://prntscr.com/j0c47z

    How is this possible?

    I see some plugins can do the job but im using already 20 different plugins so i dont want one more for such a small detail.


    Thanks

  •  568
    Stormit replied

    Hi Slobodan,

    You can add the custom PHP code below to the functions.php file of your child theme

    add_filter('woocommerce_get_price_html', 'boxshop_woocommerce_get_price_html_filter', 10, 2);
    if( !function_exists('boxshop_woocommerce_get_price_html_filter') ){
        function boxshop_woocommerce_get_price_html_filter( $price, $product ){
            if( $price ){
                $price = '<span class="text-price">CENA: </span>' . $price;
            }
            return $price;
        }
    }

    Best regards,

  • Slobodan replied

    Thanks for the quick response!

    The code works for me, glad to use this theme, until now all works perfect!

    Cheers!