By default WooCommerce Advanced Shipping will fit many needs. With its conditional logic a countless amount of combinations of shipping rates can be setup. There are however still cases where those default conditions will not fit all needs. WooCommerce Advanced Shipping has been created to be easily extendable and thus conditions can be added easily. There are a couple custom scripts available so you can get in touch via https://jeroensormani.com/woocommerce-advanced-shipping/support/ for information.
Adding a custom condition
Adding a new custom conditions consists out of 3 required functions, and 1 optional.
1) Adding the condition
The first thing you need to do is add a new condition in the drop down list. In the code snippet below we’re adding a ‘Date’ condition to the drop down.
2) Adding the value field
There are two possible value fields, 1) a regular text field, 2) a drop down field. In the code snippet below a regular text field is used, but a example for a drop down is also included in a commented out section.
3) Adding the matching condition
In this step we’re adding the functionality to see if the customer matches the variable the store owner has setup. In the code snippet below you can see the matching functions in action. This particular function can be compared to all operators (some condition only require the ‘equal to’ and ‘not equal to’ operators).
4) Adding the condition description (optional)
Via the code snippet below you can add a description that will show up when someone hovers over the question mark on the right side of the condition. When not used the question mark will not show up.
Custom condition done for you
It could be that you cannot figure things out or that you’re simply not a developer. If you want me to custom code your custom condition you can hire me. For a normal (meaning no hugely weird/complicated stuff) custom condition I ask €150,-. If you’re interested, you can reach out to me via the following contact form http://jeroensormani.com/woocommerce-advanced-shipping/support/, please mention that you’re interested in a custom condition.