WooCommerce and ZipCodeAPI

A company was using WooCommerce for the checkout screen for a Photographer site. They also had a need for the distance to a customer. This post will talk about how they used WooCommerce and ZipCodeAPI.

WooCommerce is an open-source e-commerce plugin for WordPress. It is designed for small to large-sized online merchants using WordPress. 

Case Study: WooCommerce and ZipCodeAPI

Back on the photographer site, when someone purchases a wedding package, the company needed to calculate the travel fee for the photographer to travel to the reception. So they chose ZipCodeAPI to calculate the distance between two zip codes. Without ZipCodeAPI, they would have had to charge a set travel fee and that wouldn’t be appropriate for all customers.

You can check out the site and how it uses ZipCodeAPI. Select a package and then click Continue. Once on the Checkout screen, just enter a zip code in the Ceremony Info section. Once you then tab out of that field, you will see the Travel section in the left sidebar be updated with the travel fee calculated from downtown Denver.

Alan Groarke is the Owner of Koality Web Solutions Inc. Koality is a web design and development company based in Denver, Colorado, and they built the site for their client. Koality provides design solutions for small to medium sized businesses across the USA and in Ireland.

Koality did some custom work, using javascript to capture when someone loses focus from the zip code form field, and then make an Ajax call to WooCommerce to add that travel fee to the cart for the customer.

After using ZipCodeAPI with WooCommerce since 2019, Alan said:

ZipCodeAPI is very straightforward to use and a breeze to integrate into third-party solutions. Nice to have access to analytics on the dashboard showing how many times the API was requested in a 24 hour period. ZipCodeAPI works great!

Alan Groarke, Koality Web Solutions Inc.

See ZipCodeAPI in your browser calculate the distance between zip codes. Just click on https://www.zipcodeapi.com/API#distance and enter two zip codes.

Then you can try it yourself with a free subscription: https://www.zipcodeapi.com/