Questions tagged [fee]

E-commerce usage related to additional charges

A charge, a surcharge or an addition for professional service…

157 questions
1
vote
1 answer

Allow WooCommerce Gateway Percentage Fee to work also on order pay

I've been using this snippet for a while with no issue until I noticed that a customer was able to pay by credit card without being charged a fee. They managed to make a payment via the "order-pay" page. Can anyone tell me why my code isn't working…
1
vote
1 answer

Custom fee based on cart subtotal and shipping country in WooCommerce

I made the following code based on some codes I found here. But unfortunately, it doesn't work. I need to charge extra export fee based on country list and cart value more than 1000` add_action(…
1
vote
1 answer

Sort fees by name on WooCommerce Orders and email notifications

I need to sort fees by name rather than the default by price in WooCommerce orders. Using Reordering multiple fees differently in Woocommerce cart and checkout pages answer code, I have managed to sort fees by name in cart and checkout pages. But it…
Harry Fox
  • 13
  • 2
1
vote
1 answer

Add a fee based on chosen payment gateways and user roles

I am using Check WooCommerce User Role and Payment Gateway and if they match - Apply fee answer code, and fee is added according to user role ok, but when customer confirms payment, fee is not charged. In my case payment gateway is MercadoPago,…
1
vote
0 answers

Update Fees “Name” Dynamically during checkout process or on cart

It would be great if you could help me with this. I am adding a fee basically named as "Additional Add On" on checkout page. public function change_fee_price($cart){ $fee_cost = WC()->session->get( 'my_misc_fee_cost' ); // 0 default value. …
1
vote
0 answers

Add dynamic custom fee magento 2

I am building a custom fee module for magento 2. I add a checkbox to the checkout page, if user ticks that checkbox, I will add a custom fee to the order. I successfully added the custom fee to order following this…
coinhndp
  • 2,281
  • 9
  • 33
  • 64
1
vote
1 answer

Add Extra Fee on Product Page Using Hook [Woocommerce]

add_filter( 'woocommerce_get_price_html','product_page_price_display', 9999, 2 ); function product_page_price_display( $price_html, $product ) { $orig_price = wc_get_price_to_display( $product ); $price_html = wc_price( $orig_price + 10 ); …
1
vote
1 answer

How can I exclude Taxes From a custom COD Surcharge in WooCommerce?

I'm wondering how can I exclude the Cash on Delivery Surcharge from Taxes? I have used Add fee for Cash on delivery payment method (cod) in Woocommerce code to add the COD Surcharge I want to have this charge excluded from VAT & no VAT/TAX shall be…
1
vote
1 answer

Trying to hide the add fee text if criteria is met in WooCommerce

I have a code that i found here on stackoverflow for WooCommerce that allows to add an extra fee if the order is under a set value. (in this example i have the value ten, everything under that value will add the difference as an procesing tax) I…
Florina Adriana
  • 141
  • 1
  • 8
1
vote
1 answer

Add cart fee from a variable (customer balance) in woocommerce

I am trying to add a fee (discount) at checkout based on a users account balance. We end up with refunds in virtually every order and creating coupons is very tedious. I have created a custom user field where I can quickly set the refund amount as …
southafricanrob
  • 331
  • 3
  • 15
1
vote
0 answers

woocommerce_cart_calculate_fees: Update Fee on custom input change

Image Issue Example At the WooCommerce "checkout" page: I would like to input any number in the "Custom Fee Input" - then it will be calculated in the "Total price table". - After placing order the "Custom Fee" will be auto synchronized into the…
VQH-cmd
  • 51
  • 2
  • 6
1
vote
1 answer

Add a fee based on cart items dimensions in Woocommerce

I got great help here in February, regarding a woocommerce issue where I needed an automatic fee added based on total cart height, in this thread. Now, I also need to add a calculation on item width to the code. But only if any of the items in the…
KD_1983
  • 71
  • 4
1
vote
1 answer

Fees based from WooCommerce product categories cart item count

Based on "Minimum cart item quantity for a specific product category in WooCommerce" and "Additional price based on cart item count in WooCommerce" I am trying to count the products from specific product categories in checkout page, i just need a…
yosober
  • 345
  • 3
  • 16
1
vote
1 answer

Additional price based on cart item count in WooCommerce

Based on "woocommerce change price in checkout and cart page" answer code that change the total price in checkout page, I have added some extra code to count the products that user have in cart and if user had like 9 products in cart then add some…
yosober
  • 345
  • 3
  • 16
1
vote
1 answer

Woocommerce fee added via add_fee() gets reduced after checkout

I'm using the WooCommerce add_fee() to add a packaging fee to my orders. The Code - in my opinion - is pretty straight forward: // Add custom cart fee add_action( 'woocommerce_cart_calculate_fees', 'cp_add_custom_price' ); function…
RadicalM1nd
  • 147
  • 1
  • 10