• Resolved jessamca11

    (@jessamca11)


    hi, i was just wondering if there was a way to add CAD beside $ on the prices on my items.

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support abwaita a11n

    (@abwaita)

    Hi @jessamca11,

    This will require either a plugin that adds currency codes or some custom code.

    For the custom code approach, you could append a text prefix that adds CAD before your price using the following code adapted from this article – https://www.businessbloomer.com/woocommerce-add-prefix-suffix-product-prices/:

    add_filter( 'woocommerce_get_price_html', 'bbloomer_add_price_prefix', 99, 2 );
      
    function bbloomer_add_price_prefix( $price, $product ){
        $price = 'CAD' . $price;
        return $price;
    }

    * I would recommend using the Code Snippets plugin to add custom code.
    * You might want to update the CADprefix should you change your store’s currency.

    I hope this helps.
    Thanks.

    Thread Starter jessamca11

    (@jessamca11)

    Thank you, works like a charm using Code Snippets!

    Hi @jessamca11

    Thank you for your reply. Glad to hear that it works. I’m marking this thread as resolved now. If you have any further questions, feel free to open a new topic.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘adding currency beside price’ is closed to new replies.