问题
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