This snippet will change the markup of various currencies on a per-currency basis.
/**
@brief Mark up various currencies.
@since 2019-01-30 15:23:20
**/
function mcc_mycryptocheckout_markup_amount( $action )
{
switch( $action->currency_id )
{
case 'BTC':
// BTC is 10% more expensive to use
$action->marked_up_amount = $action->marked_up_amount * 1.10;
break;
case 'ETH':
// ETH is 10% cheaper.
$action->marked_up_amount = $action->marked_up_amount * 0.90;
break;
}
}
add_action( 'mycryptocheckout_markup_amount', 'mcc_mycryptocheckout_markup_amount' );