tax

Display TAX as a separate table row instead with totals (includes $tax…) in WooCommerce 3.6+

只谈情不闲聊 提交于 2020-01-25 10:19:08
问题 I want to display the total tax as a separate row instead it currently displays with the total amount as (includes. $amount....) in WooCommerce checkout and emails. I have got one answer that does the same but only for emails. I want to display the same on the checkout page and emails as well. Can anyone please help with the updated code to display while checking out? I am using WooCommerce 3.6.5. Many thanks. 来源: https://stackoverflow.com/questions/59009742/display-tax-as-a-separate-table

WooCommerce - Enabling “Zero rate” tax class to some specific user roles

﹥>﹥吖頭↗ 提交于 2020-01-15 06:08:37
问题 In wy WooCommerce web site, I'm going to be selling to distributors AND resellers . The problem is that resellers are exempt from TAXES and therefore I need with a custom function to enable Zero taxe rate for certain customer roles (it would be optimal if WooCommerce did it on its own, but it does not). So my problem is that the code I have works perfect except that I don't know how to implement a change to calculate zero taxes if the customer is administrator OR reseller. Here is the code

WooCommerce - Enabling “Zero rate” tax class to some specific user roles

泪湿孤枕 提交于 2020-01-15 06:08:31
问题 In wy WooCommerce web site, I'm going to be selling to distributors AND resellers . The problem is that resellers are exempt from TAXES and therefore I need with a custom function to enable Zero taxe rate for certain customer roles (it would be optimal if WooCommerce did it on its own, but it does not). So my problem is that the code I have works perfect except that I don't know how to implement a change to calculate zero taxes if the customer is administrator OR reseller. Here is the code

WooCommerce - Enabling “Zero rate” tax class to some specific user roles

亡梦爱人 提交于 2020-01-15 06:07:20
问题 In wy WooCommerce web site, I'm going to be selling to distributors AND resellers . The problem is that resellers are exempt from TAXES and therefore I need with a custom function to enable Zero taxe rate for certain customer roles (it would be optimal if WooCommerce did it on its own, but it does not). So my problem is that the code I have works perfect except that I don't know how to implement a change to calculate zero taxes if the customer is administrator OR reseller. Here is the code

Disable tax programmatically for a specific user role

拥有回忆 提交于 2020-01-04 06:22:06
问题 In my woocommerce web site, I have enable Tax in general WooCommerce settings. I would like to disable tax for a specific user role programmatically ( with any hooks ), from my shop, checkout page and from order email. How could I achieve this? Thanks 回答1: You can't disable WooCommerce tax for a specific user role programmatically, but you can apply for a specific user role a zero tax rate. First you need to have this specific user role set in worpress. If it's the case, let say that this

Set different Tax rates conditionally based on cart item prices in Woocommerce

邮差的信 提交于 2019-12-29 01:28:11
问题 In My Wordpress e-commerce web site I use WP Hotel Booking , a plugin for hotel room bookings. The checkout process is done using WooCommerce . The Issue : We have different rooms with different pricing.For example : Room A price - 1500 Room B Price - 2700 Room c price - 2200 GST Tax is set at 12% for rooms wich price is below 2500 and 18% for rooms above 2500. Since I am using WP Hotel Booking for this custom product (room Management), I am unable to use the Additional Tax Classes option in

Taxes applied based on cart item quantity in Woocommerce

两盒软妹~` 提交于 2019-12-24 08:57:57
问题 Is there a way to create a tax class that applies to a product based on the quantity of this product in the cart. Example: If there is less then 6 items of the same product the taxes applies otherwise the taxes doesn't applies. Any help is appreciated. 回答1: It is is possible. First create in WooCommerce Tax settings a tax class named for example "Zero Rate" like: 1) in Tax options sections add "Zero Rate" and save: 2) A tab "Zero rate" appear. Under this tab section set the tax to zero: The

Customize Tax amount in “woocommerce_package_rates” hook

冷暖自知 提交于 2019-12-21 02:55:40
问题 I recently tried to modify all my shipping rates with hook to apply discount. Here's my code : add_filter( 'woocommerce_package_rates', 'woocommerce_package_rates' ); function woocommerce_package_rates( $rates ) { $user_id = get_current_user_id(); if ( ! wc_memberships_is_user_active_member( $user_id, 'silver' ) ) { return $rates; } $discount_amount = 30; // 30% foreach($rates as $key => $rate ) { $rates[$key]->cost = $rates[$key]->cost - ( $rates[$key]->cost * ( $discount_amount/100 ) ); }