Questions tagged [fee]

E-commerce usage related to additional charges

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

157 questions
0
votes
3 answers

Add and save custom meta data to fees in WooCommerce

I'm adding a custom fees to WC with WC()->cart->add_fee() method. My problem is that I'd like to add metadata to that fee item too. Preferably same time I'm adding the actual fee. Apparently the WC_Order_Item_Fee Object is generated in the order…
sarte
  • 315
  • 1
  • 3
  • 11
0
votes
1 answer

Apply a fee to cart in Woocommerce

I am trying to programatically add a fee to the woocommerce cart from a script which is executed on a form submission. As far as I am aware, I don't think I am able to use a hook as I need to apply the custom fee when the form on the page has been…
Lewis Browne
  • 904
  • 7
  • 23
0
votes
1 answer

Set a Zero tax rate on a cart fee in WooCommerce

In woocommerce I am adding progressive fee based on product categories with the code below (from this answer thread) and it works well: add_action( 'woocommerce_cart_calculate_fees', 'wc_custom_surcharge', 20, 1 ); function wc_custom_surcharge(…
0
votes
1 answer

WooCommerce Add Fee If Coupon Applied

I'd like to be able to add a fixed $20 fee if a given coupon code (100% off) is applied to the cart. The fee should also not have taxes applied. I'm offering a try at home service for $20, so a certain coupon would discount the cart and all…
jcooksey80
  • 11
  • 2
0
votes
0 answers

Limit order in Coinbase Pro

I try to place post-only limit orders so that there would be no fee, and the following is the related statements: from coinbase.wallet.client import Client spot_price = client.get_spot_price(currency_pair = 'BTC-USD') priceStr =…
S. Y
  • 173
  • 1
  • 1
  • 7
0
votes
0 answers

Recalculate woocommerce fee in order

I am trying to create a function which will remove any old fee's added in the order and add new ones based on the order items. I have created the function given be public function order_recalculate_taxes( $order_id ) { global $woocommerce; …
Zain Sohail
  • 464
  • 5
  • 22
0
votes
1 answer

Progressive cart item fee based on state and on product category in Woocommerce

Recently I tryied to use 2 sniped codes in one for this Woocommerce project where I need to set a fee for a specific product category (term ID: 19) and and a specific country state (Florida 'FL') Additionally I should need to multiply this fee rate…
0
votes
1 answer

Get the value of the highest price in woocommerce cart

I have some custom calculation in my woocommerce project and need to get the most expensive product in my cart to apply the correct (insurance) fee. It's working so far with this code: /** * use woocommerce fee api * calculate insurances and…
Johnny Kermode
  • 75
  • 2
  • 12
0
votes
0 answers

Add dynamic conditional fee based on radio buttons in Woocommerce checkout

In woocommerce, I am trying to add a fee using this answer code: Update fee dynamically based on radio buttons in Woocommerce checkout (credits: LoicTheAztec) I need to update the code to add third conditional option to the fee like "ribbon" in this…
Omer
  • 11
  • 3
0
votes
1 answer

Add custom fee based on total weight in Woocommerce

In WooCommerce, I am trying to add a an additional shipping fee based on cart weight. For the first 1500g the fee is 50$. Above 1500g we add 10$ to this initial $50 by steps of 1000g So for example: if cart weight is 700g we add a fee of…
0
votes
0 answers

Multiple apps under 1 google account when using Google Translate API?

How to define the service fee between different apps under 1 google account when using Google Translate API? I have more than one game in my Google Developer Console account, and it seems that they share the same account of Google Translate API. So…
0
votes
1 answer

WooCommerce - Make a set of coupons adding a fixed fee to an order

A client has a very odd request: they would like for a set of coupon codes to add a fee to an the order. Is this possible? The problem they are trying to solve is this: Currently the store offers free shipping to the lower 48 United States, for…
Cmagb
  • 37
  • 7
-1
votes
1 answer

solana spl-token transfer fee "Error: Program(IncorrectProgramId)"

I want to create my own Solana token that takes %2 fee to all transactions and total supply should be 100k token. That's why i used spl-token cli for this spl-token create-token --transfer-fee 50 1000, however after executing this command i get an…
OXI
  • 1
  • 1
-1
votes
1 answer

How does crypto exchange take a cut from trades?

Say I have ETH & other person has ZETH and we trade them. My ETH is sent to his wallet & his ZETH is sent to my wallet. Who pays the 8$ ETH transfer fee & 2$ ZETH transfer fee? I mean in order to send eth to another wallet you pay a fee to miners.…
-1
votes
1 answer

Adding Interest Rate and Overdraft Fee to banking system

This is what I'm trying to achieve: If a request is made to withdraw money over and above the allowed overdraft limit ($100), then no money is withdrawn, and a fixed flat fee ($10) is deducted from the balance. In the code below I have tried my best…
Tayla B
  • 1
  • 5
1 2 3
10
11