admin管理员组

文章数量:1336183

I just hit a stumbling block. I'm currently using the <?php echo WC()->cart->get_cart_total(); ?> function to output the price of the products in cart. However, the resulting output was pasted two times and i only have one product in cart(from the below image). I would love this to only output once. Any help would be highly appreciated.

Thanks.

For reference, below is the full code

<?php esc_html_e( 'Here is a summary of your', 'woocommerce' ); ?> <?php echo WC()->cart->get_cart_total(); ?><?php esc_html_e( 'perk', 'woocommerce' ); ?>

Here is the output(displaying two times) in the frontend

本文标签: shortcode to display woocommerce cart total