HEX
Server: nginx/1.18.0
System: Linux iZj6c1ieg2jrpk1z5tzi19Z 6.3.9-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 21 22:18:40 EDT 2023 x86_64
User: www (1001)
PHP: 8.2.4
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.cytocare.cn/wp-content/themes/peakshops/inc/woocommerce/woocommerce-cart.php
<?php
if ( ! thb_wc_supported() ) {
	return;
}

// Cart Fragments.
function thb_woocomerce_ajax_cart_update( $fragments ) {
	ob_start();
	if ( is_object( WC()->cart ) ) {
		?>
		<span class="count thb-cart-count"><?php echo esc_html( WC()->cart->get_cart_contents_count() ); ?></span>
		<?php
	}
	$fragments['.thb-cart-count'] = ob_get_clean();

	ob_start();
	if ( is_object( WC()->cart ) ) {
		?>
		<span class="thb-item-text thb-cart-amount"><?php echo WC()->cart->get_cart_subtotal(); ?></span>
		<?php
	}
	$fragments['.thb-cart-amount'] = ob_get_clean();

	return $fragments;
}
add_filter( 'woocommerce_add_to_cart_fragments', 'thb_woocomerce_ajax_cart_update', 8 );

if ( is_admin() ) {
	return;
}
function thb_before_cart() {
	echo '<div class="row">';
	echo '<div class="small-12 large-8 columns thb-cart-column">';
}
add_action( 'woocommerce_before_cart', 'thb_before_cart', 0 );

function thb_before_collaterals() {
	echo '</div>';
	echo '<div class="small-12 large-4 columns">';
}
add_action( 'woocommerce_before_cart_collaterals', 'thb_before_collaterals', 10 );

function thb_after_cart() {
	echo '</div>';
	echo '</div>';
}
add_action( 'woocommerce_after_cart', 'thb_after_cart', 0 );

// Move Crosssells.
remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
add_action( 'woocommerce_before_cart_collaterals', 'woocommerce_cross_sell_display', 5 );

// After Quick Cart text.
function thb_header_after_cart() {
	$header_cart_after_text = ot_get_option( 'header_cart_after_text' );
	if ( $header_cart_after_text && '' !== $header_cart_after_text ) {
		?>
		<div class="thb-header-after-cart">
			<?php echo do_shortcode( $header_cart_after_text ); ?>
		</div>
		<?php
	}
}
add_action( 'thb_header_after_cart', 'thb_header_after_cart' );