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

Cart discount for product that cost less in WooCommerce unless that product is already on sale

I want to add a 30% discount on the cheapest item in the cart, except if it already has a discount. Based on Cart discount for product that cost less in Woocommerce answer code, this is my code attempt: add_action('woocommerce_cart_calculate_fees',…
whisper
  • 13
  • 3
1
vote
1 answer

How to calculate handling fee based on currency and attribute value of cart items in WooCommerce

I have a code snippet running on a Woocommerce site that calculates and adds a handling fee to the cart total. There are two parts to the calculation: If the shipping rate is greater than 0, then add 18% of the shipping rate; If a product in the…
Travis
  • 15
  • 4
1
vote
1 answer

Add a WooCommerce checkout checkbox field that enable a discount based on product quantity

Based on Add a checkout checkbox field that enable a percentage fee in Woocommerce answer code, I've got a custom checkbox on which I need to offer discount to customers. I'm trying to apply the custom discount of say $0.03 x product quantity…
pkguy
  • 13
  • 3
1
vote
1 answer

Add a fee for specific user roles when "Ship to a different address?" has been checked on WooCommerce checkout

I have a wholesale site with different user roles & want to allow employees to start ordering online from here also. I want to only add a $5 fee if the user roles 'team' and 'team2' select ship to a different address (they get free shipping if sent…
1
vote
1 answer

Add a fee in WooCommerce for a specific product category, but only when related categories also present

I want to add a fee for a category (A), but to be calculated only when in the order are products from other categories (B, C, D, etc). But if only category A products are ordered, that tax does not apply. In my code the fee is added in both…
1
vote
3 answers

How to add additional fees to different products in WooCommerce cart

I use this code to add additional fee to a specific product id's. The problem is that I can add only one fee to a different products id's. add_action('woocommerce_cart_calculate_fees', 'add_fees_on_ids'); function add_fees_on_ids() { if…
amex
  • 35
  • 5
1
vote
2 answers

Determinants of smart contract execution fee

Is it possible to decompose in details how much an additional line of code will impact the gas price for execution, i.e. transferring a token from one wallet to another, before deploying a smart contract? Test networks are not very accurate there…
1
vote
1 answer

How to give a unique style to a fee on WooCommerce

I created a custom fee on Woocommerce based on a user plan. I did something like this on my functions.php: function my_discount_based_on_user_membership( $cart ) { $discount = 10; $cart->add_fee( "My Discount", -$discount ); } add_action(…
churros
  • 419
  • 1
  • 8
  • 20
1
vote
1 answer

Add fee for COD, unless local pickup is chosen on WooCommerce checkout

I currently have active code in WooCommerce and it works fine. The code allows me to apply an extra cost when the customer chooses the "COD' pyament method, + € 1.7 What I would like to understand is this: Is it possible to disable the extra cost…
1
vote
1 answer

What's the recommended way to pass on Stripe fees to customers on subscriptions?

I want to pass on stripe fees to customers paying with card, thereby encouraging them to use ACH payment methods. I've considered making the fee a separate charge, but there is a fee on the fee, and so the customer would end up paying more than the…
legendaryz
  • 53
  • 6
1
vote
1 answer

How to get sum of shipping and payment method fees in WooCommerce

I'm using WooCommerce for my e-commerce store and I'd like to know if there is some option, how to get a total price (fee) of shipping and total price (fee) of payment methods and their sum on Checkout page. (shipping fee + payment fee = result). I…
StepanP
  • 33
  • 4
1
vote
1 answer

Cash On Delivery fee based on Dokan vendors count in WooCommerce

In WooCommerce Dokan multivendor shop I have Cash On Delivery (COD) payment for customers. I created a code that counts the vendors in the cart and multiply them with the fee that i want per vendor. on my example is 2 € per vendor. so lets say that…
nikosvl97
  • 13
  • 5
1
vote
1 answer

Set a min and max shipping rate cost by shipping zone in WooCommerce

I have currently 2 shipping zones (France, Europe) and each of them have several delivery option, including flat-rate. These flat-rate options have a different equation to calculate the fee based on item qty with A B and C three different shipping…
Nick54530
  • 57
  • 4
1
vote
2 answers

Bitcoin core - How to get transaction size before send BTC to an address

How can I get transaction size before sending BTC to an external address? I am using Bitcoin core to make the transactions, and I was trying to calculate transaction size. So that I can use it to estimate transaction fee. But couldn't find a…
1
vote
1 answer

How to make a custom cart fee to be taxable in WooCommerce

Found exactly the snippet I was looking for to add a fixed fee amount to each individual cart item regardless of price. This site sells tires. So each tire will be charged 3$. Here is the code I'm using and…
TinoV
  • 43
  • 6