Beispiel #1
0
 /**
  * Integration constructor.
  * @param \Jigoshop\Container $di
  */
 public function __construct(Container $di)
 {
     add_action('jigoshop\\page_resolver\\before', function () {
         Integration::initializeGateways();
         Integration::initializeShipping();
     });
     add_action('jigoshop\\admin\\page_resolver\\before', function () {
         Integration::initializeGateways();
         Integration::initializeSettings();
     });
 }
Beispiel #2
0
 public function __construct($file)
 {
     require_once __DIR__ . '/functions.php';
     $this->setStaticVariables($file);
     $this->classLoader = $this->getClassLoader();
     $this->classLoader->addPsr4('WPAL\\', array(self::getDir() . '/vendor/megawebmaster/wpal/WPAL'));
     $this->initLoggers();
     $this->initCache();
     $this->container = new \Jigoshop\Container();
     $this->extensions = new \Jigoshop\Extensions();
     $this->container->getServices()->set('jigoshop.extensions', $this->extensions);
     $this->container->getServices()->set('class_loader', $this->classLoader);
     \Jigoshop\Integration::setClassLoader($this->classLoader);
     \Jigoshop\Integration::setContainer($this->container);
     $this->addConfigurations();
     $this->addCompilers();
     add_filter('admin_footer_text', array($this, 'footer'));
     add_action('admin_bar_menu', array($this, 'toolbar'), 35);
     add_action('jigoshop\\extensions\\install', array($this, 'installExtension'));
 }