-
-
Save corsonr/6182904 to your computer and use it in GitHub Desktop.
<?php | |
/** | |
* WooCommerce Extra Feature | |
* -------------------------- | |
* | |
* Add custom fee to cart automatically | |
* | |
*/ | |
function woo_add_cart_fee() { | |
global $woocommerce; | |
$woocommerce->cart->add_fee( __('Custom', 'woocommerce'), 5 ); | |
} | |
add_action( 'woocommerce_cart_calculate_fees', 'woo_add_cart_fee' ); |
Great, that works. Now how do you remove this added fee using another function?
I want this fees to be applied for one time per user, It should not be applied to returning customers again and again.
How can this be achieved?
Can we add extra fees per product ?
@bangbang1409, have you found out how to add a select option?
Thank you!
Hi guys I used this code and it worked 100% for me. but I want to ask does anyone know how I can add a coupon for this custom fee?
Working 100% :) Thanks buddy
Hey, I have a problem to add the fees using ajax on cart page.
On my cart I have added one checkbox. If checkbox checked then the fee add to the cart and updated the cart totals.
But right now, its' added to cart but on checkout the fees removed.
Can you please help for this?
check this link: http://www.simplepickle.com/
Thank you.
want to add donation checkbox in cart page this is working perfectly finr bt i want checkbox and accordingly price should be updated
how to make to choose value option from select list? :)
I got this working so that the fee is properly assessed and the customer pays the new total including the fee. I actually want to pass that fee on to the vendor. How would I go about adding that to the total they are able to withdraw?
Extra Cost For Woocommerce you can use this plugin that is good for it
Work perfectly, but I have a problem if in cart page can display a result but not in checkout
In chekout page, amout has zero result and item_name null, how to fixed it?