The code in this mini plugin enables you to set fees per country code. You can also set 2 fees based on a cart/checkout total for each country.
Here’s 2 Examples :
- For the United States ( country code US ), we set an extra fee of $10 if the order is under a $100 threshold. If the order is above the $100 threshold, the fee is only $5.
- For the Canada ( country code CA ) , we set an extra fee of $15 if the order is under a $100 threshold. If the order is above the $100 threshold, the fee is reduced to $10.
Here’s a couple of screenshots you can enlarge to see the above settings in action at checkout when using WooCommerce :
Installation
There’s only 1 step :
Copy and paste the PHP code to the end of your child themes functions file or custom functionality/code snippets plugin.
Settings
- Set the country codes on lines 17 and 22.
- Set the total cart/checkout threshold on lines 18 and 23.
- Set the fee’s for under and over the threshold on lines 19, 20 and 24, 25.
Add More/Change Countries
You can add more country codes to target any country in the world!
Modify or copy and paste this part of the code to add more countries to your code :
Different Fees Based on Country and Total Value in WooCommerce
Note : Support provided for customers.
You must be logged in to post a comment.