woocommerce-获取不含税的购物车总价

我正在使用Woocommerce for WordPress建立网上商店。

在结帐时, 我想包括总价的不含税。我该怎么做呢?我发现类似” get_total_ex_tax()”之类的东西, 但是不起作用。也许我格式化错误, 或在错误的地方或其他地方。有人有主意吗?

谢谢!


#1


这是显示税前显示税前总额的代码

add_action( 'woocommerce_review_order_after_shipping', 'output_total_excluding_tax' );
function output_total_excluding_tax() {
  ?>
  <tr class="total_ex_tax">
    <th>Total Excluding Tax</th>
    <td><?php echo WC()->cart->get_total_ex_tax(); ?></td>
  </tr>
  <?php
}

来源:

https://www.srcmini02.com/67567.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_36869.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?