Modify the name of a currency

This snippet will change the name, visible to the buyer, of a currency.

The snippet uses the currency symbol as the currency identifier.

The part in bold is what you duplicate and change in order to add more currencies.

/**
 @brief		Change the decimal precision of a currency.
 @since		2018-12-09 17:24:52
**/
function mcc_mycryptocheckout_get_currencies( $action )
{
 $currencies = [
 // Symbol => New name
 'BTC' => 'The original bitcoin',
 ];
 foreach( $currencies as $currency_id => $new_name )
 {
 // Check that MCC has the currency.
 if ( ! $action->currencies->has( $currency_id ) )
  return;
 // Change the name of the currency.
 $action->currencies->get( $currency_id )
  ->name = $new_name;
 }
}
add_action( 'mycryptocheckout_get_currencies', 'mcc_mycryptocheckout_get_currencies' );