• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
(08) 6244 1888
chris[at]bluekelpie.com.au
66 High Street Fremantle, WA 6160
Blue Kelpie Perth web designers

Blue Kelpie Web Design

Fremantle Web Designers and WordPress Developers

  • Home
  • WordPress Care Plans
  • WordPress Development
  • Portfolio
  • News
  • Contact

WordPress Woocommerce ABN Verification Tool

September 4, 2020 by Christopher Heneghan

Woocommerce ABN lookup and verification

A recent WordPress development project required a small Woocommerce extension to integrate a call to the Australian Government ABN Lookup tool to verify that a customer is registered as tradesman, and therefore eligible for trade discounts.

The first step was to register for access to the ABN Lookup web services. This process takes roughly 24 hours, following this you are issued with a unique developer GUID. Using Gravity Forms we were able to create a multi-page form where the first queried the user for their ABN. With a simple SOAP script the GUID and the inputted ABN were used to query the government database to recover the users registration details such as name and business entity type.

The second page of the form serves as a way for users to verify their data. Upon submission of the form a new user is created. If the ABN is valid the XML response data is converted into a PHP object. Using this object the ABN, first and last names, and business entity type are then stored in default and custom Woocommerce Billing fields.

An additional user role of ‘Trade’ was also added to the site. When users have their ABN verified we assign them to the new role, which borrows the capabilities of a ‘Customer’. The new user group is then applied to pricing matrices enabling us to set different price points for products and show different content at various locations throughout the site.

To allow for existing users to verify their ABN, a slightly modified version of the form was inserted into a Woocommerce Endpoint. This adds a simple verification tool to the Woocommerce My Account Pages.

This fun little project is just a small example of some of the custom WordPress development we really enjoy doing. Take a look at some of our web development case studies, and if you have a custom project that you need some help with don’t hesitate to get in touch with Blue Kelpie.

Summary
How to add an ABN lookup in Woocommerce?
Article Name
How to add an ABN lookup in Woocommerce?
Description
Querying the Australian Government's ABN database enables returns XML data which can then be used to populate existing and custom Woocommerce data fields.
Author
Christopher Heneghan
Publisher Name
Blue Kelpie
Publisher Logo
Blue Kelpie

Filed Under: Woocommerce Development, WordPress Development

About Christopher Heneghan

Christopher Heneghan is a passionate WordPress developer with more than 20 years experience in web design and development.

Primary Sidebar

Categories

  • Managed WordPress Hosting (1)
  • Plugins (1)
  • Security (1)
  • Woocommerce Development (2)
  • WordPress Development (2)

How to find Blue Kelpie

4A/66 High St
Fremantle 6160
Phone: 0862441888

Blue Kelpie is currently closed.

Monday9:00 AM - 5:00 PM
Tuesday9:00 AM - 5:00 PM
Wednesday9:00 AM - 5:00 PM
Thursday9:00 AM - 5:00 PM
Friday9:00 AM - 5:00 PM
Saturday9:00 AM - 3:00 PM
Sunday9:00 AM - 3:00 PM

Copyright © 2021 · Blue Kelpie Web Design