当前位置: 首页>>代码示例>>PHP>>正文


PHP EM_Object::get_tax_rate方法代码示例

本文整理汇总了PHP中EM_Object::get_tax_rate方法的典型用法代码示例。如果您正苦于以下问题:PHP EM_Object::get_tax_rate方法的具体用法?PHP EM_Object::get_tax_rate怎么用?PHP EM_Object::get_tax_rate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EM_Object的用法示例。


在下文中一共展示了EM_Object::get_tax_rate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function get_tax_rate()
 {
     return apply_filters('em_event_get_tax_rate', parent::get_tax_rate(), $this);
 }
开发者ID:javipaur,项目名称:TiendaVirtual,代码行数:4,代码来源:em-event.php

示例2:

 function get_tax_rate()
 {
     if ($this->booking_tax_rate === null) {
         //booking not saved or tax never defined
         if (!empty($this->booking_id) && get_option('dbem_legacy_bookings_tax', 'x') !== 'x') {
             //even if 0 if defined as tax rate we still use it, delete the option entirely to stop
             //no tax applied yet to an existing booking, or tax possibly applied (but handled seperately in EM_Tickets_Bookings but in legacy < v5.4
             //sort out MultiSite nuances
             if (EM_MS_GLOBAL && $this->get_event()->blog_id != get_current_blog_id()) {
                 //MultiSite AND Global tables enabled AND this event belongs to another blog - get settings for blog that published the event
                 $this->booking_tax_rate = get_blog_option($this->get_event()->blog_id, 'dbem_legacy_bookings_tax');
             } else {
                 //get booking from current site, whether or not we're in MultiSite
                 $this->booking_tax_rate = get_option('dbem_legacy_bookings_tax');
             }
             $this->legacy_tax_rate = true;
         } else {
             //first time we're applying tax rate
             $this->booking_tax_rate = parent::get_tax_rate();
         }
     }
     return $this->booking_tax_rate;
 }
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:23,代码来源:em-booking.php


注:本文中的EM_Object::get_tax_rate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。