shortcode to display woocommerce cart total

I just hit a stumbling block. I'm currently using the <?php echo WC()->cart->get_cart_total(); ?> funct

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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742401465a4436995.html

相关推荐

  • shortcode to display woocommerce cart total

    I just hit a stumbling block. I'm currently using the <?php echo WC()->cart->get_cart_total(); ?> funct

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信