Edit “Via Wallet” label when partial payment on checkout
-
When wallet total is less than Cart total, the checkout order summary says “Via Wallet” to show the wallet deduction?
How can I overwrite this?
I see in class-woo-wallet-frontend.php there is this function but I’m not sure how to make a filter to change ‘name’ in the array.
/** * Sets partial payment amount to cart as negative fee * @since 1.2.1 */ public function woo_wallet_add_partial_payment_fee() { $parial_payment_amount = apply_filters('woo_wallet_partial_payment_amount', woo_wallet()->wallet->get_wallet_balance(get_current_user_id(), 'edit')); if ($parial_payment_amount > 0) { $fee = array( 'id' => '_via_wallet_partial_payment', 'name' => __('Via Wallet', 'woo-wallet'), 'amount' => (float) -1 * $parial_payment_amount, 'taxable' => false, 'tax_class' => '', ); if (is_enable_wallet_partial_payment() && $parial_payment_amount) { wc()->cart->fees_api()->add_fee($fee); } else { $all_fees = wc()->cart->fees_api()->get_fees(); if (isset($all_fees['_via_partial_payment_wallet'])) { unset($all_fees['_via_partial_payment_wallet']); wc()->cart->fees_api()->set_fees($all_fees); } } } }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Edit “Via Wallet” label when partial payment on checkout’ is closed to new replies.