クラス
CartPage
Cart page HTML and JS
ソース ソース
ファイル: src/React/CartPage/CartPage.php
class CartPage extends CartPageBase { const SCRIPT_HANDLE = 'wcexwl-cart-react'; /** * Dropdown list of batch actions. Displayed on the cart page * * @author Evan D Shaw <evandanielshaw@gmail.com> * @param string $html * @return string */ 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; } }
- loadImplementation — Dropdown list of batch actions. Displayed on the cart page