add modules filter

This commit is contained in:
Kirill Braslavsky 2021-07-26 20:06:27 +03:00
parent 72e5a49175
commit 7d2468de00
No known key found for this signature in database
GPG key ID: 61737D0C41BF3E75

View file

@ -77,6 +77,11 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
$modules[] = ( require $module_file )();
}
$providers = array();
//Use this filter to add custom module or remove some of existing ones.
//Modules able to access container, add services and modify existing ones.
$modules = apply_filters('woocommerce_paypal_payments_modules', $modules);
foreach ( $modules as $module ) {
/* @var $module ModuleInterface module */
$providers[] = $module->setup();