Skip to content
WordPress.org
  • Showcase
  • Plugins
  • Themes
  • Hosting
  • News
    • Learn WordPress
    • Documentation
    • Education
    • Forums
    • Developers
    • Blocks
    • Patterns
    • Photos
    • Openverse ↗︎
    • WordPress.tv ↗︎
    • About WordPress
    • Make WordPress
    • Events
    • Five for the Future
    • Enterprise
    • Gutenberg ↗︎
    • Job Board ↗︎
  • Swag ↗︎
  • Get WordPress
Get WordPress
WordPress.org

Plugin Directory

TRC OTP Login

  • Submit a plugin
  • My favorites
  • Log in
  • Submit a plugin
  • My favorites
  • Log in

TRC OTP Login

By theringconcept
Download
  • Details
  • Reviews
  • Installation
  • Development
Support

Description

TRC OTP Login lets your visitors log in, register and reset their password with a one-time code sent to their WhatsApp number. It works on its own: no other login plugin is needed.

  • Login with a WhatsApp code, with an optional password login (phone number or email).
  • Registration verified by WhatsApp: name, email and password can each be required, optional or hidden.
  • Lost password: WhatsApp code, then a new password.
  • Country code selector (245 countries, translated names), priority countries and an optional allow-list.
  • Login page with 4 layouts (brand panel, centered card, full-screen photo, minimal): colors, logos, font, texts and custom CSS, with a live preview in the admin.
  • Site-wide popup; menu links (#trc-login, #trc-register) and links to old login pages open it.
  • Redirects old login addresses (e.g. /my-account/?tab=login), optionally wp-login.php, and replaces the WooCommerce login forms.
  • Existing accounts: numbers saved by WooCommerce (billing_phone), “OTP Login With Phone Number” (phone_number) or any meta key you add are recognized, and an import normalizes them.
  • Security: hashed codes, limited attempts, resend delay, limits per number and per IP address, honeypot field, fresh nonce for cached pages.
  • Sending: Meta WhatsApp Cloud API (approved templates), UltraMsg, Green-API or a custom HTTP API.

TRC OTP Login is not affiliated with or endorsed by WhatsApp or Meta.

Country calling codes and number formats come from libphonenumber-js (MIT license).

External services

This plugin sends the one-time code through the WhatsApp provider you choose in the settings. Only the selected provider is contacted, and only when a code is requested (login, registration, lost password, admin test) or when you load your templates in the admin.

  • Meta WhatsApp Cloud API (graph.facebook.com): receives the recipient’s phone number and the message (template name, language and parameters, including the code). It is also called from the admin to list your approved templates. Terms: https://www.whatsapp.com/legal/business-terms — Privacy policy: https://www.whatsapp.com/legal/privacy-policy
  • UltraMsg (api.ultramsg.com): receives the recipient’s phone number and the message text. Terms: https://ultramsg.com/terms-conditions.php — Privacy policy: https://ultramsg.com/privacy-policy.php
  • Green-API (api.green-api.com or the host you set): receives the recipient’s phone number and the message text. Terms: https://green-api.com/en/user-agreement — Privacy policy: https://green-api.com/en/privacy-policy
  • Custom HTTP API: receives the data you configure (usually the phone number and the message) at the URL you enter. Its terms are those of the service you choose.
  • Google Fonts (fonts.googleapis.com, fonts.gstatic.com): when a Google font is selected in the Design tab, the login forms and page load it from Google, which receives the visitor’s IP address. Choose “Theme font” to avoid this request. Privacy policy: https://policies.google.com/privacy

Shortcodes

  • [trc_wa_login_form tab=”login|register|lostpw” redirect=”URL”]
  • [trc_wa_login_page]
  • [trc_wa_login_link tab=”login|register” text=”Log in”]
  • Menu links #trc-login, #trc-register; classes trc-login-tgr, trc-register-tgr.

Customization

  • Filters: trc_wa_login_redirect, trc_wa_new_user_data, trc_wa_new_username, trc_wa_new_user_role, trc_wa_registration_errors, trc_wa_find_user_by_phone, trc_wa_countries, trc_wa_otp_code, trc_wa_otp_meta_payload, trc_wa_otp_message_text, trc_wa_ip_hourly_limit, trc_wa_client_ip, trc_wa_isolate_keep.
  • Actions: trc_wa_logged_in, trc_wa_user_registered, trc_wa_otp_send_failed, trc_wa_otp_after_send.
  • JavaScript: TRCWAAuth.open(‘login’ | ‘register’), TRCWAAuth.close().
  • PHP: trc_wa_otp_send( $phone, $code ) sends a code outside the login forms.

Screenshots

Login page, "brand panel" layout: the visitor enters their WhatsApp number.
Login page, “brand panel” layout: the visitor enters their WhatsApp number.
Registration form: name, WhatsApp number and optional email.
Registration form: name, WhatsApp number and optional email.
Code entry, with automatic resend timer.
Code entry, with automatic resend timer.
Login popup, available on every page of the site.
Login popup, available on every page of the site.
Login page on mobile.
Login page on mobile.
Design settings with live preview of the login page.
Design settings with live preview of the login page.
Form settings: login method, countries, registration fields.
Form settings: login method, countries, registration fields.
WhatsApp provider settings (Meta WhatsApp Cloud API, UltraMsg, Green-API or custom HTTP API).
WhatsApp provider settings (Meta WhatsApp Cloud API, UltraMsg, Green-API or custom HTTP API).
Migration tab: recognize and import phone numbers already saved on user accounts.
Migration tab: recognize and import phone numbers already saved on user accounts.

Installation

  1. Upload the plugin (Plugins → Add New → Upload Plugin) and activate it.
  2. Settings → TRC OTP Login → WhatsApp API and Message: enter your provider credentials and template, then use the Test tab.
  3. Pages & popup: click “Create the Login page”, then add the old login addresses to replace.
  4. Design: layout, colors, logos.
  5. Migration: “Import numbers” if your members already have a phone number on their account.
  6. Check that an existing account can log in, then deactivate your previous login plugin.

FAQ

Do I need a WhatsApp Business account?

Yes. With the Meta WhatsApp Cloud API you need a WhatsApp Business account, a phone number ID, a permanent access token and an approved message template (an “Authentication” template is recommended). UltraMsg and Green-API work with their own WhatsApp instances.

Can I keep a password login?

Yes. The login method can be “WhatsApp code only”, “WhatsApp code with password option” or “password only” (registration is then still verified by WhatsApp).

Where are phone numbers stored?

In the user meta trc_wa_phone (international format, digits only). The verified number is also copied into empty phone fields (WooCommerce billing_phone and the fields you list). Numbers are kept when the plugin is uninstalled.

Can I customize the login page template?

Copy templates/login-page.php into your theme as trc-otp-login/login-page.php.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“TRC OTP Login” is open source software. The following people have contributed to this plugin.

Contributors
  • theringconcept

Translate “TRC OTP Login” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

2.3.0

  • Plugin renamed “TRC OTP Login” (slug trc-otp-login). Settings, phone numbers and shortcodes are unchanged.

2.2.0

  • All names stored by the plugin now use the trc_wa_ prefix (user meta, shortcodes, AJAX actions, scripts). Existing user data and shortcodes in posts and Elementor are migrated automatically; update shortcodes placed in widgets by hand.
  • Rate limits and code attempts use atomic counters, so simultaneous requests cannot exceed them.
  • If you use the WhatsApp gateway of “OTP Login With Phone Number”, select it again in that plugin’s settings (its identifier is now trc_wa_whatsapp).
  • New accounts can never receive a privileged role, even through filters.
  • The custom CSS field was removed: use Appearance → Customize → Additional CSS instead.
  • Scripts and styles are always enqueued; translations are delivered by translate.wordpress.org.

2.1.0

  • First public release on WordPress.org: English source strings with French translation.
  • Removed compatibility code for third-party login popup plugins (their shortcodes, buttons and phone fields). Phone fields from any plugin can still be added under Forms → Existing accounts.
  • Default country: Benin. Scripts loaded with the defer strategy.
  • Settings page renamed “TRC OTP Login”, with the plugin icon.

2.0.5

  • Adjustable per-IP code limit (Forms tab), with one-click temporary lift (1 h, 4 h, 24 h) or full disable from the settings or the “TRC OTP Login” dashboard widget. Useful when several people register in a row on the same device.
  • Only codes actually sent count toward the limits.

2.0.4

  • Benin: +229 XX XX XX XX and +229 01 XX XX XX XX are the same account; the number is always saved and contacted in the 10-digit format (01). Old 8-digit accounts are updated at login or during import.

2.0.3

  • Username of new accounts built from the name (firstname.lastname), optionally with the last 4 digits, or the phone number only.
  • The verified number is always saved in the phone fields (billing_phone, added fields): at registration, at each login and during import, without overwriting another number.

2.0.2

  • Role of new accounts: the site default role (Settings → General) instead of “Customer”; button to apply it to accounts already created.
  • “Check a number” tool (Migration tab): recognized account and source field, without sending or changing anything.
  • Additional configurable phone fields.

2.0.1

  • The embedded form (shortcodes, WooCommerce) is shown as a centered card, even on a full-width page. Option style=”plain”.
  • “Yellow and slate” color preset.
  • Link color computed to stay readable on white, even with a light primary color.

2.0.0

  • Standalone plugin: WhatsApp login, registration and lost password forms.
  • Designed login page (4 layouts) with live preview, popup, old page redirects, WooCommerce and wp-login.php replacement.
  • Recognition and import of existing numbers (WooCommerce and LWP).

1.1.0

  • “Full payload” mode, payload generated from Meta templates, payload preview, Meta errors explained.

1.0.0

  • Initial release (WhatsApp gateway for “OTP Login With Phone Number”).

Meta

  • Version 2.3.0
  • Last updated 1 day ago
  • Active installations Fewer than 10
  • WordPress version 5.9 or higher
  • Tested up to 7.1.4
  • PHP version 7.4 or higher
  • Tags
    loginotpphone loginwhatsappwoocommerce
  • Advanced View

Ratings

No reviews have been submitted yet.

Your review

See all reviews

Contributors

  • theringconcept

Support

Got something to say? Need help?

View support forum

  • About
  • News
  • Hosting
  • Privacy
  • Showcase
  • Themes
  • Plugins
  • Patterns
  • Learn
  • Documentation
  • Developers
  • WordPress.tv ↗
  • Get Involved
  • Events
  • Donate ↗
  • Swag ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org

The WordPress® trademark is the intellectual property of the WordPress Foundation.

  • Visit our X (formerly Twitter) account
  • Visit our Bluesky account
  • Visit our Mastodon account
  • Visit our Threads account
  • Visit our Facebook page
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our TikTok account
  • Visit our YouTube channel
  • Visit our Tumblr account
Code is Poetry