<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Farrukh Sobirov]]></title><description><![CDATA[Farrukh Sobirov]]></description><link>https://sobirov.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6aea286578e6607ed7fa4bb5/f21ce69b-0878-464a-8111-cd68cec98e06.png</url><title>Farrukh Sobirov</title><link>https://sobirov.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 13:04:24 GMT</lastBuildDate><atom:link href="https://sobirov.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I built a WooCommerce login plugin that only creates accounts after email verification]]></title><description><![CDATA[How I built Logvia, a free WooCommerce login plugin: a popup, 6-digit email verification before accounts exist, and Google sign-in with PKCE.]]></description><link>https://sobirov.hashnode.dev/i-built-a-woocommerce-login-plugin-that-only-creates-accounts-after-email-verification</link><guid isPermaLink="true">https://sobirov.hashnode.dev/i-built-a-woocommerce-login-plugin-that-only-creates-accounts-after-email-verification</guid><category><![CDATA[WordPress]]></category><category><![CDATA[woocommerce]]></category><category><![CDATA[wordpress plugins]]></category><category><![CDATA[PHP]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Farrux Sobirov]]></dc:creator><pubDate>Tue, 03 Nov 2026 18:42:41 GMT</pubDate><content:encoded><![CDATA[<p>For the last few years most of my work has been WooCommerce stores for clients. And on almost every project I hit the same two problems with login and registration:</p>
<ol>
<li><strong>The screens looked different on every theme.</strong> The default WooCommerce "My Account" form takes its styling from the theme, so on one site it looked fine and on the next it was a mess of misaligned inputs.</li>
<li><strong>The user list filled up with fake accounts.</strong> WooCommerce creates the account the moment someone submits the form. Bots love that.</li>
</ol>
<p>I kept fixing these one site at a time. In the end I turned the fix into a plugin: <a href="https://wordpress.org/plugins/logvia/"><strong>Logvia</strong></a>. It was approved on <a href="https://wordpress.org">WordPress.org</a> this week.</p>
<h2>What Logvia does</h2>
<ul>
<li><strong>A login and sign-up popup.</strong> Shoppers log in or register without leaving the product or cart page. It also works as a full page at <code>/auth/</code>, and can slide in from the side instead of opening in the centre.</li>
<li><strong>Email verification before the account exists.</strong> New customers get a six-digit code by email. The WordPress user is created only after they type it in.</li>
<li><strong>Google sign-in, built in.</strong> One button, with no extra plugin and no SDK.</li>
<li><strong>A drag and drop registration form builder.</strong> 15 field types, including phone with country code, country and state, dropdowns and dates. Each answer can be saved to the user profile, WooCommerce billing fields or a custom meta key.</li>
<li><strong>Bot protection.</strong> Cloudflare Turnstile or Google reCAPTCHA v2/v3, rate limiting and password rules.</li>
<li><strong>Theme-independent design.</strong> Its own CSS, scoped so the theme can't break it, with an accent colour, corner radius and layout you choose in the settings.</li>
</ul>
<h2>Three decisions I'm happy with</h2>
<h3>1. Don't create the user until the email is proven</h3>
<p>Most "email verification" plugins create the account first and then flag it as unverified. That still leaves you with thousands of junk rows in <code>wp_users</code>.</p>
<p>Logvia keeps a pending registration instead. While the code is pending it stores <strong>only a password hash</strong> and the form answers, never the plain password. Codes expire, wrong guesses are limited, and only a correct code turns the pending entry into a real WordPress user. Bots that never read the email never become users.</p>
<h3>2. Google sign-in with PKCE and a safe default for staff</h3>
<p>The Google flow is the standard OAuth 2.0 authorization-code flow with <strong>PKCE</strong> and a <code>state</code> value stored in a short-lived cookie. No Google JavaScript SDK is loaded on the page, so there are no extra tracking scripts.</p>
<p>One default I care about: <strong>administrators, editors and shop managers cannot log in with Google</strong> unless the site owner allows it. If a staff member's Google account is ever compromised, it shouldn't hand someone the dashboard.</p>
<h3>3. No jQuery, no build step for the store owner</h3>
<p>The front end is plain JavaScript. The popup, the phone field with its searchable country list and the password strength meter all work without jQuery. The CSS is scoped and every interactive state is set explicitly, so theme <code>button:hover</code> styles don't bleed into the popup.</p>
<h2>What the <a href="https://wordpress.org">WordPress.org</a> review taught me</h2>
<p>The plugin team's review was strict and fair. The fixes they asked for are worth knowing if you are about to submit your own plugin:</p>
<ul>
<li><strong>Check the nonce at the very start of every handler</strong>, before reading any other <code>$_POST</code> data. Each action should have its own nonce.</li>
<li><strong>Escape late, sanitise early.</strong> Every value printed to HTML goes through the right <code>esc_*</code> function at the point it is printed.</li>
<li><strong>Watch the plugin name.</strong> Names that start with a trademark ("WooCommerce …", "Google …") are not allowed. Mine became <em>Logvia – Login and Registration with Google Sign-In for WooCommerce</em>.</li>
<li><strong>Document every external service</strong> in the readme: what is sent, when, and links to the service's terms and privacy policy.</li>
<li><strong>Don't lock features in the free version.</strong> A paid add-on is fine, but whatever is in the free plugin has to work fully.</li>
</ul>
<p>Running the <strong>Plugin Check</strong> plugin before submitting saved me at least one review round.</p>
<h2>Free and Pro</h2>
<p>The free plugin is complete on its own and has no trials or locked buttons. <strong>Logvia Pro</strong> is a separate add-on for stores that need more: file upload and profile photo fields, manual approval for B2B and wholesale customers, "log in to add to cart", password-less sign-up and extra fields on the My Account and Users screens.</p>
<h2>Try it</h2>
<ul>
<li>Free on <a href="https://wordpress.org">WordPress.org</a>: <a href="https://wordpress.org/plugins/logvia/"><strong>https://wordpress.org/plugins/logvia/</strong></a></li>
<li>Docs, changelog and Pro: <a href="https://sobirov.dev/en/logvia/"><strong>https://sobirov.dev/en/logvia/</strong></a></li>
</ul>
<p>In your dashboard, go to <strong>Plugins → Add New</strong>, search for "Logvia" and activate it. Most stores are set up after the first three steps of the <a href="https://sobirov.dev/en/logvia/docs/">documentation</a>.</p>
<p>If you run a WooCommerce store, I'd really like to hear what works and what doesn't. Leave a comment here or open a thread on the <a href="https://wordpress.org/support/plugin/logvia/">support forum</a>.</p>
<p><em>I'm Farrukh Sobirov, a WordPress and Next.js developer from Tashkent. More of my work is at</em> <a href="https://sobirov.dev"><em>sobirov.dev</em></a><em>.</em></p>
]]></content:encoded></item></channel></rss>