関数
Container::loadPage()
ページとアセットを読み込んでから終了する
戻り値 戻り値
ファイル: src/Components/CheckoutReview/Container.php
public function loadPage() {
$this->buildComponents();
add_action('wcexaap_checkout_review_template', [$this, 'containerTemplate']);
add_action('wp_enqueue_scripts', [$this, 'enqueueAssets']);
usces_get_entries();
usces_get_carts();
usces_get_members();
$this->beforeTemplateInclude();
$parent_path = get_template_directory() . '/wc_templates';
$child_path = get_stylesheet_directory() . '/wc_templates';
$plugins_url_path = WP_PLUGIN_DIR . '/wcex-amazonpay/templates';
$theme_template = wp_get_theme()->template;
// TCD Welcartの場合、プラグイン内のファイルを取り込む
if (file_exists($child_path . '/cart/wc_amazon_quickpay_page.php')) {
include($child_path . '/cart/wc_amazon_quickpay_page.php');
} elseif (file_exists($parent_path . '/cart/wc_amazon_quickpay_page.php') && !defined('USCES_PARENT_LOAD')) {
include($parent_path . '/cart/wc_amazon_quickpay_page.php');
} elseif ($theme_template === 'glamour_tcd073') {
include($plugins_url_path . '/glamour_tcd073/cart/wc_amazon_quickpay_page.php');
} elseif ($theme_template === 'ego_welcart_tcd079') {
include($plugins_url_path . '/ego_welcart_tcd079/cart/wc_amazon_quickpay_page.php');
} elseif ($theme_template === 'iconic_tcd062') {
include($plugins_url_path . '/iconic_tcd062/cart/wc_amazon_quickpay_page.php');
} else {
echo $this->getPageTemplate();
}
$this->afterTemplateInclude();
exit;
}