本文整理汇总了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);
}
示例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;
}