
Shipping is one of the most challenging parts of scaling a WooCommerce store – especially in a country like Australia, where vast geography, regional access, and freight rules can dramatically affect delivery logistics and costs.
When a client needed a custom WooCommerce shipping solution that supported multiple delivery types and postcode-specific pricing, we built a tailored plugin.
The business needed to accomodate a number of delivery methods, including different types of locations and a wide range of products from small widgets to large commercial machinery.
With a complex delivery pricing matrix, an out-of-the-box solutions couldn’t meet these needs, so we developed a plugin from scratch.
Building the plugin
The client had created a complex algorithm for calculating the shipping of any type of order to any postcode across Australia. We extracted this matrix into a database table that served as a lookup table when calculating shipping rates. This approach removed the calculations from the server, keeping the website loading fast even in uncached pages like the cart and checkout.
A second application was required to add a shipping estimator to individual product pages. Using AJAX the calculator ran without requiring additional page loads. This proved to be essential for working with variable products where each variation may have unique weights and dimensions.
A final consideration was required in version 2.0 with the addition of a second store in another state. The matrix must consider the closest and cheapest delivery method.
Lessons Learned
- Pushing the pricing matrix into a database table enabled for a simple SQL query to lookup that ran fast, removing the weight of calculating the shipping costs from the server.
- Using AJAX calls for the lookup led to improved user experience and allowed us to work in better with inbuilt Woocommerce functionality.
- Build for scale-modularity helps with future changes. We found a good balance in breaking the plugin down into core functions that could be repeated with each of the delivery methods used. This paid dividends when we refactored the plugin to build in additional functionality.
Future Improvements
This project provided us with new insights into both the complexities of shipping in Australia. It also helped us to refine our knowledge of how shipping works in Woocommerce. With some of our clients using a number of different shipping companies to meet their requirements we have given some thought to an all in one shipping solution that gathers rates from from each provider for a given order. For this to work efficiently we believe it would be necessary to utilise an external database with a shipping lookup table with stored rates for almost any type of order, at least to the point at which there are a number of options.
Final Thoughts
This plugin gave our client complete control over their shipping logic in WooCommerce. For any store facing similar logistical complexity-especially in regions like Australia – a custom plugin is often the most reliable solution.