Title: How to convert price programatically
Last modified: September 1, 2016

---

# How to convert price programatically

 *  Resolved [Musilda](https://wordpress.org/support/users/musilda/)
 * (@musilda)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-convert-price-programatically/)
 * Hello
 * i used this snippet:
 *     ```
       global $woocommerce_wpml;
                   if( !empty( $woocommerce_wpml ) ){
                           if( property_exists( $woocommerce_wpml,'multi_currency' ) ){
   
                               $fee = $woocommerce_wpml->multi_currency->convert_price_amount($fee);
   
                           }
                   }
       ```
   
 * but this not working anymore. Convert_price_amount get fatal error.
 * [https://wordpress.org/plugins/woocommerce-multilingual/](https://wordpress.org/plugins/woocommerce-multilingual/)

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

 *  [George Botsev](https://wordpress.org/support/users/botzev/)
 * (@botzev)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-convert-price-programatically/#post-7521591)
 * Hello,
    Would you mind to share the error that you are getting?
 * Where are you using this snippet exactly?
    It might be that the class that contains
   that function is not loaded, I need more information in order to investigate 
   properly.
 *  [George Botsev](https://wordpress.org/support/users/botzev/)
 * (@botzev)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-convert-price-programatically/#post-7521596)
 * Ok, I think that I see one error.
 * We changed some things recently, and you are calling for:
    $fee = $woocommerce_wpml-
   >multi_currency->convert_price_amount($fee);
 * While the function convert_price_amount is not in multi_currency class, but in
   multi_currency_prices class.
 * I hope that this helps.
 *  [George Botsev](https://wordpress.org/support/users/botzev/)
 * (@botzev)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/how-to-convert-price-programatically/#post-7521798)
 * Marking this ticket as resolved because there is no activity for a month now.

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

The topic ‘How to convert price programatically’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-multilingual/assets/icon-256x256.png?rev=2937122)
 * [WPML Multilingual & Multicurrency for WooCommerce](https://wordpress.org/plugins/woocommerce-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-multilingual/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [George Botsev](https://wordpress.org/support/users/botzev/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/how-to-convert-price-programatically/#post-7521798)
 * Status: resolved