芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/www/wp-content/plugins/woocommerce/src/Blocks/BlockTypes/MiniCartFooterBlock.php
get_cart_instance(); $subtotal_label = __( 'Subtotal', 'woocommerce' ); $other_costs_label = __( 'Shipping, taxes, and discounts calculated at checkout.', 'woocommerce' ); $display_cart_price_including_tax = get_option( 'woocommerce_tax_display_cart' ) === 'incl'; $subtotal = $display_cart_price_including_tax ? $cart->get_subtotal_tax() : $cart->get_subtotal(); $formatted_subtotal = ''; $html = new \WP_HTML_Tag_Processor( wc_price( $subtotal ) ); $wrapper_attributes = get_block_wrapper_attributes( array( 'data-wp-interactive' => 'woocommerce/mini-cart-footer-block', 'class' => 'wc-block-mini-cart__footer', ) ); if ( $html->next_tag( 'bdi' ) ) { while ( $html->next_token() ) { if ( '#text' === $html->get_token_name() ) { $formatted_subtotal .= $html->get_modifiable_text(); } } } wp_interactivity_state( $this->get_full_block_name(), array( 'formattedSubtotal' => $formatted_subtotal, ) ); ?>
>
cart; if ( $cart && $cart instanceof \WC_Cart ) { return $cart; } return null; } /** * Render the markup for the Mini-Cart Contents block. * * @param array $attributes Block attributes. * @param string $content Block content. * @param WP_Block $block Block instance. * @return string Rendered block type output. */ protected function render( $attributes, $content, $block ) { if ( Features::is_enabled( 'experimental-iapi-mini-cart' ) ) { return $this->render_experimental_iapi_mini_cart_footer( $attributes, $content, $block ); } return $content; } }