Server IP : 104.21.14.103 / Your IP : 18.191.237.31 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/home/giankuin/sieuthiweb.com.vn/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/sidebar/ |
Upload File : |
/** * External dependencies */ import { OrderSummary, SubtotalsItem, TotalsFeesItem, TotalsCouponCodeInput, TotalsDiscountItem, TotalsFooterItem, TotalsShippingItem, TotalsTaxesItem, } from '@woocommerce/base-components/cart-checkout'; import { useShippingDataContext } from '@woocommerce/base-context'; import { getCurrencyFromPriceResponse } from '@woocommerce/base-utils'; import { COUPONS_ENABLED, DISPLAY_CART_PRICES_INCLUDING_TAX, } from '@woocommerce/block-settings'; import { useStoreCartCoupons } from '@woocommerce/base-hooks'; const CheckoutSidebar = ( { cartCoupons = [], cartItems = [], cartTotals = {}, } ) => { const { applyCoupon, removeCoupon, isApplyingCoupon, isRemovingCoupon, } = useStoreCartCoupons(); const { needsShipping } = useShippingDataContext(); const totalsCurrency = getCurrencyFromPriceResponse( cartTotals ); return ( <> <OrderSummary cartItems={ cartItems } /> <SubtotalsItem currency={ totalsCurrency } values={ cartTotals } /> <TotalsFeesItem currency={ totalsCurrency } values={ cartTotals } /> <TotalsDiscountItem cartCoupons={ cartCoupons } currency={ totalsCurrency } isRemovingCoupon={ isRemovingCoupon } removeCoupon={ removeCoupon } values={ cartTotals } /> { needsShipping && ( <TotalsShippingItem currency={ totalsCurrency } noResultsMessage={ null } isCheckout={ true } showCalculator={ false } values={ cartTotals } /> ) } { ! DISPLAY_CART_PRICES_INCLUDING_TAX && ( <TotalsTaxesItem currency={ totalsCurrency } values={ cartTotals } /> ) } { COUPONS_ENABLED && ( <TotalsCouponCodeInput onSubmit={ applyCoupon } initialOpen={ false } isLoading={ isApplyingCoupon } /> ) } <TotalsFooterItem currency={ totalsCurrency } values={ cartTotals } /> </> ); }; export default CheckoutSidebar;