WP Manifestindependent plugin directory
manifest / ecommerce / email-autologin-woocommerce

Email Auto-Login for WooCommerce

WordPress plugin — auto-login users via ?login=email@example.com URL parameter. Ideal for cart recovery emails and personalized campaigns.

by TEDxPV · github.com/ank892/email-autologin-woocommerce

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/ank892/email-autologin-woocommerce/archive/refs/heads/main.zip

WordPress plugin that auto-logs in users by passing their email address in the URL. Ideal for email marketing campaigns, cart recovery emails, and personalized links sent directly to customers.


How it works

Add ?login=email@example.com to any URL on your site:

https://yourstore.com/cart?set_cart=34557263&login=customer@gmail.com

The plugin will:

  1. Find the WordPress user with that email
  2. Log them in automatically
  3. Remove the login parameter from the URL
  4. Load the page normally (preserving all other parameters)

The user lands on:

https://yourstore.com/cart?set_cart=34557263

Installation

From ZIP (recommended)

  1. Download email-autologin.zip from the Releases page
  2. Go to WordPress Admin → Plugins → Add New → Upload Plugin
  3. Upload the ZIP and click Install Now
  4. Click Activate Plugin

Manual

  1. Copy the email-autologin/ folder to wp-content/plugins/
  2. Activate from WordPress Admin → Plugins

No configuration required — it works out of the box.


Usage examples

# Simple login + go to cart
https://yourstore.com/cart?login=customer@gmail.com

# Login + WooCommerce cart with specific product
https://yourstore.com/cart?set_cart=34557263&login=customer@gmail.com

# Login + go to checkout
https://yourstore.com/checkout?login=customer@gmail.com

# Login + any custom parameter
https://yourstore.com/my-account?login=customer@gmail.com&ref=campaign-spring

Optional configuration

Add to wp-config.php if needed:

// Change the URL parameter name (default: "login")
define('EMAIL_LOGIN_PARAM', 'login');

// Restrict to specific IPs only (empty = all IPs allowed)
define('EMAIL_LOGIN_ALLOWED_IPS', '203.0.113.1, 203.0.113.2');

Behavior reference

Situation Result
Valid registered email Auto-login → redirect without login param
Email not registered Does nothing, page loads normally
User already logged in Does nothing
Malformed email Does nothing
IP not in allowlist Does nothing

Security

This plugin logs users in without a password. The security model relies on the link being sent directly and privately to each recipient (email campaign, WhatsApp message, etc.).

Do not use these links in:

  • Public web pages
  • Social media posts
  • Shared documents

Best practices:

  • Always use HTTPS so the email address is not exposed in transit
  • Use EMAIL_LOGIN_ALLOWED_IPS if your email provider has fixed IPs
  • Combine with short-lived WooCommerce cart sessions

Requirements

  • WordPress 5.8+
  • PHP 8.0+
  • WooCommerce (optional — works with any WordPress site)

License

MIT