Title: Variable price
Last modified: September 4, 2021

---

# Variable price

 *  Resolved [vimal05](https://wordpress.org/support/users/vimal05/)
 * (@vimal05)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/variable-price-5/)
 * HI..superb plugin!! one quick question, the snippet to display the price in fiat
   + crypto does not work if the product has a variation. it ETH price is zero. 
   Using default code. any help ?
 *     ```
       // Show product prices in fiat + crypto
       function mcc_woocommerce_get_price_html( $text, $product )
       {
           // Is MCC installed?
           if ( ! function_exists( 'mycryptocheckout' ) )
               return $text;
           // Retrieve all of our currencies.
           $currencies = MyCryptoCheckout()->currencies();
           // Change this to your preferred currency symbol
           $show_currency = 'ETH';
           $currency = $currencies->get( $show_currency );
           // Is this currency known?
           if ( ! $currency )
               return $text;
           $new_price = $currency->convert( get_woocommerce_currency(), $product->get_price() );
           return $text . ' | ' . $new_price  . ' ' . $show_currency;
       }
       add_filter( 'woocommerce_get_price_html', 'mcc_woocommerce_get_price_html', 100, 2 );
       ```
   

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

 *  Plugin Author [edward_plainview](https://wordpress.org/support/users/edward_plainview/)
 * (@edward_plainview)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/variable-price-5/#post-14837634)
 * Is there a functiona available to fetch the current variation?
 *  Thread Starter [vimal05](https://wordpress.org/support/users/vimal05/)
 * (@vimal05)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/variable-price-5/#post-14845084)
 * Hi Thanks. But guess i solved it as it was clashing with another woocommerce 
   plugin. Disable that and its working fine now. Have the prices of variable now
   showing the converted crypto equivalent.
 *  Plugin Author [edward_plainview](https://wordpress.org/support/users/edward_plainview/)
 * (@edward_plainview)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/variable-price-5/#post-14845095)
 * For the sake of other people reading, would it not be a good idea to say exactly
   _which_ plugin you disabled?

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

The topic ‘Variable price’ is closed to new replies.

 * ![](https://ps.w.org/mycryptocheckout/assets/icon.svg?rev=1869074)
 * [MyCryptoCheckout - Bitcoin, Ethereum, and 100+ altcoins for WooCommerce](https://wordpress.org/plugins/mycryptocheckout/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mycryptocheckout/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mycryptocheckout/)
 * [Active Topics](https://wordpress.org/support/plugin/mycryptocheckout/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mycryptocheckout/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mycryptocheckout/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [edward_plainview](https://wordpress.org/support/users/edward_plainview/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/variable-price-5/#post-14845095)
 * Status: resolved