clear cache when changing settings

This commit is contained in:
David Remer 2020-07-09 09:10:35 +03:00
parent 8388644906
commit 7fb1e25ad8
2 changed files with 13 additions and 2 deletions

View file

@ -61,7 +61,11 @@ return [
$settings = $container->get('wcgateway.settings');
$fields = $container->get('wcgateway.settings.fields');
$webhookRegistrar = $container->get('webhook.registrar');
return new SettingsListener($settings, $fields, $webhookRegistrar);
global $wpdb;
$cacheFactory = new CachePoolFactory($wpdb);
$pool = $cacheFactory->createCachePool('ppcp-token');
return new SettingsListener($settings, $fields, $webhookRegistrar, $pool);
},
'wcgateway.order-processor' => static function (ContainerInterface $container): OrderProcessor {