関数
Master::init()
戻り値 戻り値
ファイル: src/Master.php
public function init() {
add_action('usces_after_cart_instant', function () {
$this->restRoutes = new Routes\Rest($this);
$this->restRoutes->dispatcher->listen();
}, 11);
Config\Permalink::init();
Views\Snackbar\Snackbar::init();
(new Routes\Redirect($this))->init();
$this->estore = new Error\Store();
$this->estore->populate();
Views\LoginPage::init();
Views\Header::init();
if (Config\Options::useReact()) {
(new React\CartPage\CartPage($this))->init();
(new React\ItemPage\ItemPage($this))->init();
(new React\WishlistPage\WishlistPage($this))->init();
} else {
(new Views\CartPage\CartPage($this))->init();
(new Views\ItemPage\ItemPage($this))->init();
(new Views\WishlistPage\WishlistPage($this))->init();
}
$cptmc = new CptmClient(
'AWW001',
WCEXWL_VERSION,
WCEXWL_PLUGIN_FILE,
'https://api.aivec.co.jp/cptmp/v1/getProvidersList/AWW001'
);
$cptmc->init();
(new SettingsPage($cptmc, 'WCEX Wishlist'))->createProviderSelectSettingsPage();
// global functions
require_once(__DIR__ . '/api-functions.php');
require_once(__DIR__ . '/template-functions.php');
// the following is for deprecated functionality
require_once(__DIR__ . '/Deprecated/filters.php');
require_once(__DIR__ . '/Deprecated/functions.php');
}