Account Builder - Login / Register question - {do_action:woocommerce_before_customer_login_form}

Hey all,

Recently made a webshop with WooCommerce and Bricks, works like a charm, so thanks for that!

But, I’m now building another one and I pulled up the academy so I don’t forget anything: WooCommerce Account Builder – Bricks Academy

I noticed this bit:

IMPORTANT: Ensure you have inserted a Basic Text element with {do_action:woocommerce_before_customer_login_form} before your Login and Register form. And another Basic Text element with {do_action:woocommerce_after_customer_login_form} after the forms.

I did not use this on webshop number 1. Is this necessary? And what does it do exactly? Because site number 1 still works as intended.. What am I missing here? Why is this a necessity? Can anyone explain it to me?

Thanks in advance!

1 Like

Hey Robbert!

Short answer: it’s not strictly necessary for things to work, it’s more of a compatibility safety net for third-party plugins.

Those two hooks (woocommerce_before_customer_login_form and woocommerce_after_customer_login_form) fire in WooCommerce’s default form-login.php template. They don’t render anything themselves, they’re just empty hook points where other plugins can inject their own stuff like reCAPTCHA / Turnstile widgets and their scripts, Social login buttons (Google, Facebook login), custom notices and messages etc.

When you build your own login page with Bricks Builder, you’re replacing the default template, so those hook points are gone unless you put them back. The {do_action:...} Basic Text elements just re-fire them so any plugin expecting those hooks still has somewhere to attach.

Site #1 probably works fine because you’re not running any plugin that hooks into those points. The moment you install one, it might fail without warning and you’ll be debugging for an hour wondering why.

Just add them. Costs nothing and saves you headaches later if you (or a client) ever install a plugin that needs them.

2 Likes

Thank you so much for this clear explanation Ivo! For real, makes sense now and I’ll add them everywhere.

Learned something today haha! Cheers and thanks again!!

1 Like