setup(); } $proxy = new ProxyContainer(); $provider = new CompositeCachingServiceProvider( $providers ); $container = new CachingContainer( new DelegatingContainer( $provider ) ); $proxy->setInnerContainer( $container ); foreach ( $modules as $module ) { /* @var $module ModuleInterface module */ $module->run( $container ); } $initialized = true; } } add_action( 'plugins_loaded', function () { init(); } ); register_activation_hook( __FILE__, function () { init(); do_action( 'woocommerce_paypal_payments_gateway_activate' ); } ); register_deactivation_hook( __FILE__, function () { init(); do_action( 'woocommerce_paypal_payments_gateway_deactivate' ); } ); // Add "Settings" link to Plugins screen. add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), function( $links ) { array_unshift( $links, sprintf( '%2$s', admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=ppcp-gateway' ), __( 'Settings', 'woocommerce-paypal-payments' ) ) ); return $links; } ); } )();