1
我尝试做一件很简单的事情,但对我来说,我不会让它工作。根据收费有条件地定制WooCommerce购物车总计总产量
这是从WC-车-的functions.php
if (! empty($tax_string_array)) {
$taxable_address = WC()->customer->get_taxable_address();
$estimated_text = WC()->customer->is_customer_outside_base() && ! WC()->customer->has_calculated_shipping()
? sprintf(' ' . __('estimated for %s', 'woocommerce'), WC()->countries->estimated_for_prefix($taxable_address[0]) . WC()->countries->countries[ $taxable_address[0] ])
: '';
$value .= '<small class="includes_tax">' . sprintf(__('(includes %s)', 'woocommerce'), implode(', ', $tax_string_array) . $estimated_text) . '</small>';
}
}
echo apply_filters('woocommerce_cart_totals_order_total_html', $value);
}
如果施加任何$fee
的$值应有所不同。 但我只得到0.00 €
值从$fee
变量,如果我检查。
可能有人请帮助我简单地套用在可变的费用的价值和像一个简单的if
条款检查:
如果应用费用---> 1
其他---> 2
我该怎么办?
Wohoooo! Awsome谢谢你!完美满足我的需求。只剩下两个小问题,你救了我的命。我需要将结账后的概览以及发送给客户的电子邮件传递给总览。任何想法如何做的伎俩? ------> 10000000在此先感谢! –
是的,它做到了!非常感谢。但是电子邮件和结账后呢?你能不能帮助我呢? –