doushajian2018 2015-09-25 08:59
浏览 61

获取简单订阅产品的订阅价格及其注册费用

I am using woocommerce subscriptions plugin. I want to get the subscription price plus the sign up fee of a product of type "simple subscription".

I am able to get subscription price using this function :

<?php WC_Subscriptions_Product::get_price( $product ) ?>

However I want to have the sign up fee also, so that I can add the prices together and display.

  • 写回答

1条回答 默认 最新

  • douting0585 2015-09-25 16:30
    关注

    Take a look in the class-wc-product-subscription.php file. There are two functions get_sign_up_fee_including_tax() and get_sign_up_fee_exluding_tax().

    So you should be able to get the sign up fee like so:

    $product->get_sign_up_fee_including_tax();
    

    Sidenote, I think you can get the pure price from $product->get_price() but you will need Subscriptions specific functions to get the subscriptions strings. ---

    评论

报告相同问题?

悬赏问题

  • ¥15 单纯型python实现编译报错
  • ¥15 c++2013读写oracle
  • ¥15 c++ gmssl sm2验签demo
  • ¥15 关于模的完全剩余系(关键词-数学方法)
  • ¥15 有没有人懂这个博图程序怎么写,还要跟SFB连接,真的不会,求帮助
  • ¥15 PVE8.2.7无法成功使用a5000的vGPU,什么原因
  • ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
  • ¥15 安装quartus II18.1时弹出此error,怎么解决?
  • ¥15 keil官网下载psn序列号在哪
  • ¥15 想用adb命令做一个通话软件,播放录音