関数
CartPage::loadImplementation( string $html )
カートページに表示されている一括処理のドロップダウンリスト。
パラメータ パラメータ
- $html
(文字列) (必須)
ファイル: src/React/CartPage/CartPage.php
protected function loadImplementation($html) {
$assetsmap = include(WCEXWL_PLUGIN_DIR . '/dist/js/React/CartPage/App.asset.php');
wp_enqueue_script(
self::SCRIPT_HANDLE,
WCEXWL_PLUGIN_URL . '/dist/js/React/CartPage/App.js',
$assetsmap['dependencies'],
$assetsmap['version'],
true
);
wp_localize_script(
self::SCRIPT_HANDLE,
'wcexwl',
array_merge(
$this->master->getScriptInjectionVariables(),
[
'btnprimary' => Master::getFilterableValues()['btnprimary'],
'updateCartMessage' => __('Press the `update` button when you change the amount of items.', 'usces'),
'quantityRenewalText' => __('Quantity renewal', 'usces'),
]
)
);
ob_start();
?>
<div id="<?php echo Master::REACT_DOM_NODE ?>" class="wcexwl"></div>
<?php
$html = (string)ob_get_clean();
return $html;
}