Variable price
-
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)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Variable price’ is closed to new replies.