• Hi,

    I have a price for public and another one for retails.

    How can I add the label retails near the price of retails. Something like : “retail price :”. Is that possible?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • I believe you can try something like this:

    add_filter(‘woocommerce_currency_symbol’, ‘change_existing_currency_symbol’, 10, 2);

    function change_existing_currency_symbol( $currency_symbol, $currency ) {
    switch( $currency ) {
    case ‘Retail: ‘: $currency_symbol = ‘Retail: $’; break;
    }
    return $currency_symbol;
    }

    You probably need to take it a step further and test which user is currently logged in, then you could replace the stock price with “Retail: $5.99” when user is retail and then “$5.99” when it’s just the public.
    This code goes in your functions.php file of your theme. You should make a child theme from your main theme; if you just update your main theme’s functions.php file, the next update will potentially “erase” the changes you made.

    Cheers.
    Dave

Viewing 1 replies (of 1 total)
  • The topic ‘How to add a label near the price in front office’ is closed to new replies.