Hi, {{first_name|friend}}. 👋

Welcome to Issue #183 of Loop WP!

Last week was a quick WooCommerce tutorial on a common feature I use for my Shopify clients, plus some bonus code!

This week, we are revisiting WooCommerce Address Autocomplete as I share what went wrong with my code and another free plugin you can now use!

Let’s go! 👇

Peak Performance WordPress Hosting. No Compromises.

Next-gen Managed WordPress hosting; genuine autoscaling that instantly adapts to any traffic spikes, turbocharged high-frequency CPUs for exceptional clock speeds & unlimited global CDN pre-caching for blazing-fast load times.

Revisiting Address Autocomplete

Back in Issue 181, I took a look at the Address Autocomplete feature in WooCommerce in 10.3. I released some code, but found issues with:

  • The new Places API (so I used the current API, which is being retired).

  • The Block Checkout (my code was only working in the Classic checkout).

Thankfully, Nadir Seghir (Building Checkout in WooCommerce) came to the rescue.

After reviewing Nadir’s walkthrough, and aside from the APIs, I saw many differences in our approaches, and that’s where I fell down. 👇

Integration Method

  • My plugin - Manually injects JavaScript and tries to hook into WooCommerce forms directly with jQuery.

  • Nadir's plugin - Properly extends WC_Address_Provider and WC_Integration classes, and registers with WooCommerce's native address autocomplete system using: window.wc.addressAutocomplete.registerAddressAutocompleteProvider()

Block Checkout Compatibility

  • My plugin - Uses jQuery selectors for specific field IDs (#billing_address_1), which don’t exist in Block Checkout.

  • Nadir's plugin - Uses WooCommerce’s abstracted provider system that works with both Classic and Block Checkouts.

🧠 You can read more on these abstracted providers (which are designed to cut down on code):

Nadir talks more about the abstracted code (which you can view in GitHub) in his tutorial, which we will dig into now. 👇

Nadir’s Solution & Free Plugin

If you missed my newsletter on this, you need to know that in WooCommerce 10.3, WooCommerce added support for address autocomplete, but no provider is bundled, so merchants must plug in their own.

Nadir Seghir, very kindly, went above and beyond in reply to my tweet and followed up with a detailed tutorial using Claude and code edited by Nadir.

Nadir is making the plugin available on the WordPress Plugin Repository, but in the meantime, you can download it from GitHub.

A huge thank you to Nadir for this and for making the code available to the community.

A Small Issue

I found an inconsequential issue with HPOS compatibility (which my plugin didn’t trigger, as it wasn’t functioning correctly) that displayed a warning in the WP Admin area:

“WooCommerce has detected that some of your active plugins are incompatible with currently enabled WooCommerce features."

This warning appears because WooCommerce detects that Nadir’s plugin declares compatibility with the Address Autocomplete feature, but the plugin file lacks the required compatibility declaration headers.

It’s a non-issue because the plugin will work with HPOS because it doesn't interact with orders at all; however, it’s nice to get rid of the warning, which we can do by using a declaration before the before_woocommerce_init

// Declare HPOS compatibility
add_action( 'before_woocommerce_init', function() {
	if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
		\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
		\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'address_autocomplete', __FILE__, true );
	}
} );

My Updated AutoComplete Plugin

🎉 As well as fixing the inconsequential issue above, my updated version of the plugin now works on both the Classic and Block Checkouts (thanks again, Nadir), and I’ve made some changes to my original plugin:

  • Removed the inline CSS (now using default styles)

  • Adding a settings screen to the WooCommerce Integrations to allow more configuration:

    • Enable/disable the autocomplete.

    • Add an obscured API key (instead of editing plugin files).

    • Adding country restrictions (instead of editing plugin files).

You can view an updated version of my plugin on GitHub, which I have now made public and created a repo.

(My plugin remains a single file, but if you want to edit the JS separately, then you can move this into a new file and call it autocomplete.js)

Before You Go

This experience has taught me that it’s hard to code for both the Classic and Block Checkout. WooCommerce’s own Checkout Field Editor is not compatible with the Checkout Block.

Having said that, there are lots of great resources from Woo for extending/customising the Block Checkout:

That’s it for this week. 👋

Sponsorship Opportunities

🚨 The Google Doc contains all the details if you’re interested in sponsoring the Loop WP Newsletter.

An espresso shot for your brain

The problem with most business news? It’s too long, too boring, and way too complicated.

Morning Brew fixes all three. In five minutes or less, you’ll catch up on the business, finance, and tech stories that actually matter—written with clarity and just enough humor to keep things interesting.

It’s quick. It’s free. And it’s how over 4 million professionals start their day. Signing up takes less than 15 seconds—and if you’d rather stick with dense, jargon-packed business news, you can always unsubscribe.

Classifieds

Get access to WooCommerce tutorials, private community powered by humans, and exclusive learning content with the Business Bloomer membership.

Kinsta, a reliable hosting partner for your WordPress sites. Everything you need: edge caching, CDN, WAF, 24/7 support, free migrations and much more.

Weekly WordPress News & Tips

This week's excellent and insightful WordPress News & Tips:

  • November Office Hours - Exploring WooCommerce MCP Beta. (WooCommerce)

  • 😎 Safer Plugin Choices - FAIR and Patchstack Build Security MVP at CloudFest USA Hackathon. (The Repository)

  • New Plugin Alert! - Simple Points and Rewards for WooCommerce. (RelyWP)

  • ⚡️ That Was Fast - FluentCart Integration Available Now. (Independent Analytics)

  • Snippet - Limiting allowed blocks without breaking the Site Editor. (WordPress Dev Blog)

  • 4.0 Out Now! - Breadcrumbs Block – Navigation Trail. (Justin Tadlock)

  • Components Are Coming - Elementor V4 introduces a new reusable modular design system , letting you build, reuse, and maintain complex designs faster than ever! (Elementor)

  • WP Legends - Brian Coords, Developer Advocate at WooCommerce, on the Future of eCommerce on WordPress (Seahawk Media)

  • Powerful Stuff! - A video explaining how to customise event templates in the site editor using the block bindings API, attributes and meta keys. (Lesley Sim)

  • 🔥 Launch Special - Convert your guest order buyers into registered customers on WooCommerce with our new plugin (Naked Cat Plugins)

  • Should It Be In Core? - Real-Time Collaboration Flagged for WordPress 7.0 Amid Ongoing Technical Challenges. (The Repository)

  • New, But Limited - How WordPress 6.9 gives forms a theme.json makeover. (WordPress Dev Blog)

  • 🤯 He’s Done It Again! - A sneak peek at Class Manager, a powerful new way to manage classes and CSS styles in the Block Editor. (Mike McAlister)

  • Abilities Explorer - A unified registry of callable WordPress capabilities with defined inputs and outputs, built for AI integrations and developer automation. (Tammie Lister)

  • 🔖 Bookmark This! - The Ultimate WordPress Debugging Guide. (Remkus de Vries)

  • WordPress Explorations - Pages & Layers. (Rich Tabor)

  • Ready For The Rush? - Top 7 WooCommerce Best Practices for Black Friday. (Rocket[dot]net)

  • Shipping - Top six things to consider for last-mile shipping in EMEA. (WooCommerce)

  • 🤠 Roundup! - What’s new for developers? (November 2025). (WordPress Dev Blog)

  • Trademark Enforcement - Letters of Protest Fail to Stop ‘Managed WordPress’ and ‘Hosted WordPress’ U.S. Trademark Bids. (The Repository)

  • WordPress 6.9 - Release Candidate 1 ready for testing. (WordPress)

If you have a question about this email or WordPress, please reply, and I will respond as soon as possible.

👋 Until next time,

Keep Reading

No posts found