fee

WooCommerce - Adding shipping fee for free user plan

会有一股神秘感。 提交于 2019-12-02 04:29:00
问题 I am using WooCommerce and with Paid Memberships Pro free plugin. On the web site we have 2 plans (a free plan and a paid plan): Free users can buy 1 item each month, Paid users can buy 4 items each months. Now I don't know how to simply calculate shipping on checkout page with code like: if (pmpro_hasMembershipLevel('2')) { // Paid plan //free shipping (0$) } else { //add shipping 4$ to checkout } No shipping class, No region zone is affect shipping price. I have tried to set Shipping

WooCommerce - Adding shipping fee for free user plan

久未见 提交于 2019-12-02 01:37:55
I am using WooCommerce and with Paid Memberships Pro free plugin . On the web site we have 2 plans (a free plan and a paid plan): Free users can buy 1 item each month, Paid users can buy 4 items each months. Now I don't know how to simply calculate shipping on checkout page with code like: if (pmpro_hasMembershipLevel('2')) { // Paid plan //free shipping (0$) } else { //add shipping 4$ to checkout } No shipping class, No region zone is affect shipping price. I have tried to set Shipping options, but I can’t get rid of it. How can I achieve this? Thanks. LoicTheAztec Since WooCommerce 2.6+,

Add tax free fees to WooCommerce cart programmatically

老子叫甜甜 提交于 2019-11-29 11:41:28
I try to add fees based on some calculations I do on Woocommerce cart, but I want to exclude it from VAT. This is my code: function woo_add_cart_fee( $cart ) { global $woocommerce; $bookable_total = 0; foreach(WC()->cart->get_cart() as $cart_item_key => $values) { $_product = $values['data']; //doing my stuff to calculate $fee variable WC()->cart->add_fee( 'Fees: ', $fee, false, '' ); //WC()->cart->add_fee( 'Fees: ', $fee, true, '' ); //WC()->cart->add_fee( 'Fees: ', $fee, false, 'zero rate' ); //WC()->cart->add_fee( 'Fees: ', $fee, true, 'zero rate' ); } add_action( 'woocommerce_cart

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

两盒软妹~` 提交于 2019-11-28 14:49:45
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 which I have shipping classes and table rates properly configured. However, the coupons the customer has sold on a daily deal site are supposed to remove the free shipping benefit and add a fixed shipping fee. How can achieve this? LoicTheAztec Yes you can do it with that snippet code (for a set of coupons): function coupon_add_cart_fee( $bookable_total

Add a fee for a specific product category in Woocommerce

狂风中的少年 提交于 2019-11-28 10:44:00
问题 I already found this code here and it works for like 80/90% for me (see below). This code adds 60 euro to my cart when there is a product from category ID 349 in the cart. When I add a product from that category to my cart when the cart is empty it works fine. But when there is already a product in my cart from a different category and then I add the product with category 349 it doesn't add the 60 euro extra fee. How is this possible? function woo_add_cart_fee() { $category_ID = '349'; global

Add tax free fees to WooCommerce cart programmatically

不羁的心 提交于 2019-11-28 04:58:27
问题 I try to add fees based on some calculations I do on Woocommerce cart, but I want to exclude it from VAT. This is my code: function woo_add_cart_fee( $cart ) { global $woocommerce; $bookable_total = 0; foreach(WC()->cart->get_cart() as $cart_item_key => $values) { $_product = $values['data']; //doing my stuff to calculate $fee variable WC()->cart->add_fee( 'Fees: ', $fee, false, '' ); //WC()->cart->add_fee( 'Fees: ', $fee, true, '' ); //WC()->cart->add_fee( 'Fees: ', $fee, false, 'zero rate'

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

浪子不回头ぞ 提交于 2019-11-27 08:42:27
问题 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 which I have shipping classes and table rates properly configured. However, the coupons the customer has sold on a daily deal site are supposed to remove the free shipping benefit and add a fixed shipping fee. How can achieve this? 回答1: Yes you can do