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在此先感謝! –
是的,它做到了!非常感謝。但是電子郵件和結賬後呢?你能不能幫助我呢? –