Skip to content

Instantly share code, notes, and snippets.

@Musilda
Created August 7, 2019 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Musilda/f61559aa1b078103f3c1541cd4b6f18e to your computer and use it in GitHub Desktop.
Save Musilda/f61559aa1b078103f3c1541cd4b6f18e to your computer and use it in GitHub Desktop.
<?php
$ExchangeRate = apply_filters( 'idoklad_exchange_rate', false, $order_id );
if( $ExchangeRate != false ){
$data['ExchangeRate'] = $ExchangeRate;
}
$ExchangeRateAmount = apply_filters( 'idoklad_exchange_rate_amount', false, $order_id );
if( $ExchangeRateAmount != false ){
$data['ExchangeRateAmount'] = $ExchangeRateAmount;
}
add_filter( 'idoklad_exchange_rate', 'toret_add_idoklad_exchange_rate', 10, 2 );
function toret_add_idoklad_exchange_rate( $rate, $order_id ){
return 25; //Decimal number
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment