Automattic\WooCommerce\Gateways\PayPal
TransactAccountManager::update_transact_account_cache
Update the transact account (merchant or provider) cache.
Method of the class: TransactAccountManager{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->update_transact_account_cache( $cache_key, $account_data ): void;
- $cache_key(string|null) (required)
- The cache key to update.
- $account_data(array|true|false) (required)
- The transact account data.
Changelog
| Since 10.5.0 | Introduced. |
TransactAccountManager::update_transact_account_cache() TransactAccountManager::update transact account cache code WC 10.9.4
private function update_transact_account_cache( string $cache_key, $account_data ): void {
$expires = time() + self::TRANSACT_ACCOUNT_CACHE_EXPIRY;
update_option(
$cache_key,
array(
'account' => $account_data,
'expiry' => $expires,
)
);
}