在更新貨幣匯率時執行。返回所有支持的自動更新貨幣
參數
變量 | 類型 | 注意 |
---|---|---|
USD | float | |
GBP | float |
響應
一組鍵 -> 值對,用於定義或覆蓋額外的匯率。匯率應適合歐元貨幣。
示例代碼
<?php
//Return an exchange rate for the XBT currency
add_hook('FetchCurrencyExchangeRates', 1, function($vars) {
//Code here to fetch the the current exchange rate relative to EUR
//Return exchange rate relative to 1 EUR
return ['XBT' => 927.121,];
});
相關用法
- PHP FilesystemIterator __construct()用法及代碼示例
- PHP WHMCS FraudCheckAwaitingUserInput用法及代碼示例
- PHP WHMCS FraudOrder用法及代碼示例
- PHP FilesystemIterator getFlags()用法及代碼示例
- PHP FilesystemIterator next()用法及代碼示例
- PHP WHMCS FormatDateTimeForClientAreaOutput用法及代碼示例
- PHP FrenchToJD()用法及代碼示例
- PHP WHMCS FileDownload用法及代碼示例
- PHP FilesystemIterator rewind()用法及代碼示例
- PHP FilesystemIterator key()用法及代碼示例
- PHP WHMCS FraudCheckFailed用法及代碼示例
- PHP WHMCS FraudCheckPassed用法及代碼示例
- PHP FilesystemIterator current()用法及代碼示例
- PHP FilesystemIterator setFlags()用法及代碼示例
- PHP WHMCS FormatDateForClientAreaOutput用法及代碼示例
- PHP WHMCS ClientAreaPageDownloads用法及代碼示例
- PHP Ds\Map isEmpty()用法及代碼示例
- PHP PHPUnit assertIsNotFloat()用法及代碼示例
- PHP disk_total_space()用法及代碼示例
- PHP ReflectionClass getTraitAliases()用法及代碼示例
- PHP hash_hmac()用法及代碼示例
- PHP String wordwrap()用法及代碼示例
- PHP XMLWriter endPi()用法及代碼示例
- PHP SimpleXMLElement children()用法及代碼示例
- PHP IntlCalendar getTimeZone()用法及代碼示例
注:本文由純淨天空篩選整理自whmcs.com大神的英文原創作品 FetchCurrencyExchangeRates。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。