Based of Calculate fee from cart totals (subtotal + shipping) without adding it to order total value in Woocommerce
I know how to get cart totals. Fees and discounts are included in the calculation.
// Get cart subtotal & shipping total & fees &…
Based on Add a checkout checkbox field that enable a percentage fee in Woocommerce answer code I created a checkbox on the checkout page.
When it is checked, it applies a 15% freight forwarding fee.
// Add a custom checkbox fields before order…
Since I already have access to the order ID and the list of orders, how do I get access to each order fee from each each order?
I have the following, but where and how do I insert that inside my existing code, allowing me to add it as an $orderList…
Using Add a dynamic fee based on a select field in WooCommerce Checkout answer code I managed to add a new fee on a checkbox change:
add_action('woocommerce_after_checkout_billing_form', 'checkout_shipping_form_packing_addition', 20);
function…
Here is the code I currently have:
add_action('woocommerce_cart_calculate_fees' , 'add_custom_fees');
function add_custom_fees( $cart ){
if (is_admin() && !defined('DOING_AJAX')) {
return;
}
$pizza_ice = 0;
$pizza_materials…
I have a plugin installed -> "Payment Gateway Based Fees and Discounts for WooCommerce" which helped me add two fees:
14,99 delivery fee on Card Payment
19,99 delivery fee on Cash on delivery
The problem is that I want to give free delivery if…
We have a special case where we invoice our customers for payment after the order has been received instead of having them pay during checkout. Shipping charges are manually calculated and added to the order and then we add a 3% credit card fee on…
I heard that if Ethereum transaction fails for some reason, then remaining gas is refunded. But what if the transaction's nonce is wrong? If you deliberately propagate the same nonce transaction from an account, it is judged to be wrong…
I've been trying to pay the 5$ fee to be able to publish a chrome extension, but I'm stuck at the dialog. I've successfully added my card and I'm also able to select it in the dialog but when hitting the "buy" button the page just refreshes and the…
In Woocommerce I am trying to add a shipping fee if a cart item has a specific shipping class assigned to the related product. I would like this shipping fee to be multiplied by the cart item quantity…
I have this working when a product is added to…
In Woocommerce, I am trying to get the display of a custom fee, when the fee amount is zero, to make it appear in the order detail table.
Based on "Update fee dynamically based on radio buttons in Woocommerce checkout" answer code,
I have manage to…
I use add_fee method to charge my cart price. It works and it is OK but when I click the checkout button and I go to the checkout page or I refresh the page the new price disappear and old price is there . How can I save my price in cart?
function…
I want to add custom % value at woocommerce checkout page, but I want to show it only for Swiss country and hide it for others. Now I have the right code working for that, but the problems is that Im not able to show it when user choose switzerland.…
I was looking for a way to add a deposit on the TOTAL Cart Amount on a Woocommerce site (rather than just adding a deposit to each product line item).
I found the answer to this ingenious thread here: Deposit based on a percentage of total cart…
I would like to add a fee to certain categories if the total number of products from all the defined category is 1 or separate fee if the quantity is 2-9.. (IE. + $10 to the product if they only order 1, +$5 per product if they order 2-9 items).
I…