Adding currency rate to varibles

江枫思渺然 提交于 2019-12-24 22:34:26

问题


add_filter( 'gform_field_value_bank20_code', 'my_custom_population_showcountry' );
function my_custom_population_showcountry( $value ) {
$current_user = wp_get_current_user();
$users = $current_user->PROCESSOR;

 // For the country Afghanistan
 if( $current_user->PROCESSOR == 'Afghanistan' )
$users = ( '500' );

// For the country Albania
if( $current_user->PROCESSOR == 'Albania' )
$users = ( '600' );

// For the country Algeria
if( $current_user->PROCESSOR == 'Algeria' )
$users = ( '600' );

// For the country American Samoa
if( $current_user->PROCESSOR == 'American Samoa' )
$users = ( '600' );


return $users;    
}

Now since we got it working with the above code, i will like us to add a google api currency rate or yahoo finance rate inside that number column so that the rates will be updated automatically, instead of using manual method to update. and this will be for each country.

来源:https://stackoverflow.com/questions/59034541/adding-currency-rate-to-varibles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!