Automattic\WooCommerce\Gateways\PayPal
TransactAccountManager::get_cache_key
Get the cache key for the transact account.
Метод класса: TransactAccountManager{}
Хуков нет.
Возвращает
string|null. The cache key, or null if the account type is invalid.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_cache_key( $account_type ): ?string;
- $account_type(строка) (обязательный)
- The type of account to get (merchant or provider).
Список изменений
| С версии 10.5.0 | Введена. |
Код TransactAccountManager::get_cache_key() TransactAccountManager::get cache key WC 11.2.2
private function get_cache_key( string $account_type ): ?string {
if ( 'merchant' === $account_type ) {
return $this->gateway->testmode ? self::TRANSACT_MERCHANT_ACCOUNT_CACHE_KEY_TEST : self::TRANSACT_MERCHANT_ACCOUNT_CACHE_KEY_LIVE;
}
if ( 'provider' === $account_type ) {
return $this->gateway->testmode ? self::TRANSACT_PROVIDER_ACCOUNT_CACHE_KEY_TEST : self::TRANSACT_PROVIDER_ACCOUNT_CACHE_KEY_LIVE;
}
return null;
}