Developers English WordPress Plugin

Listing User Assign for Listeo: Developer Guide

Developer notes for safe owner assignment customizations, package meta, cron queues, AJAX handlers, email templates, and license-safe extension points.

Listing User Assign for Listeo Version 1.1 19 min read Updated Jun 30, 2026
Developer scope. This guide documents the current Listing User Assign for Listeo implementation after the 6.2.2 changes. It covers assignment flow, SMS integration, package/payment behavior, email queueing, AJAX handlers, options, cron, and safe extension boundaries. It does not document or permit license bypasses, nulled behavior, entitlement spoofing, or update bypasses.

Architecture overview

The plugin is an admin-only onboarding tool. It registers a ListingPilot Hub submenu, renders a modern admin management screen, creates or matches owner users from listing metadata, updates listing authorship, assigns Listeo user packages, optionally creates WooCommerce payment orders, queues emails, sends SMS through Listeo SMS, and exposes license/update/support workflows.

Main plugin fileBootstraps constants, menus, assets, queue table, cron, updates, and license initialization.
LUUA_User_HandlerRenders the listing manager and handles user creation, batch processing, package assignment, paid orders, SMS, and inline edits.
LUUA_SettingsRegisters settings, tabs, email templates, SMS template, license actions, support form, and license REST callback.
Queue table{$wpdb->prefix}luua_email_queue stores email notifications and delivery state.

Do not customize licensing

Do not modify, intercept, fake, or override license validation, stored license status, local detach state, update package downloads, license REST callbacks, or ListingPilot entitlement checks. License-related endpoints and options are product infrastructure, not extension points.

Core options

OptionPurpose
luua_listings_per_pageAdmin listing table pagination.
luua_user_creation_methodemail or phone. Phone mode triggers Listeo SMS flow.
luua_send_emailEnables email queueing for email-based assignment.
luua_email_subject, luua_email_templateNew-user email subject and content.
luua_existing_user_email_subject, luua_existing_user_email_templateExisting-user assignment email subject and content.
luua_sms_templateSMS content used when luua_user_creation_method is phone.
luua_email_batch_size, luua_email_batch_intervalEmail queue throughput.
luua_default_package_idFallback package when the batch action does not select a package.
luua_package_assignment_modeimmediate or paid_order.
luua_package_durationFallback package duration used by the package insert fallback.
luua_unclaimed_timeout_enabled, luua_unclaimed_timeout, luua_unclaimed_statusDaily unclaimed listing status management.
luua_enable_debug_logEnables protected debug logging under uploads.

Email queue table

Activation creates {$wpdb->prefix}luua_email_queue with id, listing_id, recipient, subject, content, status, created_at, and sent_at. Supported statuses are queued, sent, failed, and cancelled. Uninstall drops this table and clears plugin options/transients.

Listing and user data model

DataUse
listing._emailEmail identifier for email mode. Existing users are matched with get_user_by('email').
listing._phonePhone identifier for phone + SMS mode.
user_meta.phone, user_meta.billing_phoneExisting user lookup keys for phone mode.
listing._user_package_idStores the Listeo user package row ID connected to the listing.
listing._verifiedUsed by filters and unclaimed timeout checks.
listing._user_assigned_dateUsed by the unclaimed timeout query.

Assignment flow

  1. The admin selects listings from the management table.
  2. JavaScript sends batches to luua_bulk_create_users_batch.
  3. The handler validates the listing post type and required identifier.
  4. The handler matches an existing user by email or phone, or creates a new owner user.
  5. The selected package overrides the default package; if neither exists, package assignment is skipped.
  6. Immediate mode changes post_author and assigns the package immediately.
  7. Paid-order mode may create a WooCommerce order or hand off subscription checkout.
  8. Email mode queues email content; phone mode sends SMS through Listeo SMS.

Package behavior

Available packages are WooCommerce products with product type terms listing_package or listing_package_subscription. Assignment prefers listeo_core_give_user_package() when available. If not available, it inserts into {$wpdb->prefix}listeo_core_user_packages using product meta such as _listing_limit, _listing_duration, _listing_featured, and package option flags.

Mode/caseImplementation detail
Immediate assignmentRuns wp_update_post() to change post_author, assigns package, updates _user_package_id, and may call listeo_core_increase_package_count().
Paid non-subscription packageCreates a WooCommerce order with _luua_claim_listing_id, _luua_claim_user_id, _luua_claim_package_id, and _luua_claim_status=pending_payment.
Paid subscription packageReturns an official WooCommerce checkout URL using add-to-cart; the batch does not assign ownership automatically.
Payment completionfinalize_paid_claim_order() runs on payment complete, processing, and completed statuses to assign ownership and package.

SMS integration

Phone mode builds an SMS message from luua_sms_template and sends through Listeo_Sms_Notification::send(). The plugin intentionally fails with clear errors when the official SMS class is missing, listeo_enable_sms is disabled, or listeo_sms_debug is enabled.

AJAX actions

ActionPurpose
luua_bulk_create_users_batchProcesses selected listing IDs in AJAX batches.
luua_update_listing_metaInline update for listing _email or _phone.
luua_update_listing_packageInline package update/removal for one listing.
luua_search_listingsAutocomplete search by title, email, or phone.
luua_process_queue_nowManual email queue processing.
luua_get_package_info, luua_get_package_durationPackage metadata helpers for the admin UI.
luua_test_emailSends a Pro test email and records a sent log entry.
luua_send_support_emailSends support requests with optional validated attachment.
luua_save_license_key, luua_detach_license_site, luua_reenable_license_site, luua_clear_license_transientReserved license actions. Do not override.

Cron and automation

HookPurpose
luua_process_email_queueProcesses queued emails according to luua_email_batch_size and luua_email_batch_interval.
luua_custom_intervalCustom WP-Cron schedule in minutes from luua_email_batch_interval.
luua_check_unclaimed_listingsDaily status update for unverified listings older than the configured timeout.

WooCommerce hooks

The plugin suppresses standard customer order emails for LUUA claim orders through WooCommerce email filters, because LUUA sends its own onboarding email/SMS with payment links. It finalizes paid claim orders on woocommerce_payment_complete, woocommerce_order_status_processing, and woocommerce_order_status_completed.

REST route

POST /wp-json/luua/v1/license-update is used for license status updates and is protected by X-LUA-API-TOKEN matching the stored luua_api_token. This route is license infrastructure and must not be used for custom workflows.

Safe customization patterns

  • Add preflight reports for duplicate emails, duplicate phones, missing packages, or admin-owned listings.
  • Add custom validation before batch processing, while preserving nonce and capability checks.
  • Add audit logging after assignment or payment finalization.
  • Customize email/SMS templates through settings, not by editing handler code.
  • Use a small compatibility plugin for integrations with CRM, SMS logging, or custom package rules.
  • Keep license, updater, and product API code untouched.

High-risk areas

  • Phone mode can create users without email addresses. Make sure downstream plugins can handle that.
  • Paid-order mode intentionally delays ownership assignment until payment completion.
  • Subscription packages are not auto-finalized by the batch flow.
  • Inline package removal deletes the listing _user_package_id link, so verify billing/package policy before exposing it to operators.
  • The debug log redacts license keys, but debug logging should still be disabled when not troubleshooting.

Regression test checklist

  • Email mode creates a new owner user and queues the new-user email.
  • Email mode matches an existing user and queues the existing-user email.
  • Phone mode matches phone and billing_phone user meta.
  • Phone mode sends SMS only when Listeo SMS is active, enabled, and not in debug mode.
  • Immediate package assignment updates listing author and _user_package_id.
  • Paid non-subscription packages create WooCommerce orders and finalize on processing/completed/payment complete.
  • Subscription package batches include checkout links but do not assign ownership automatically.
  • Email queue statuses move correctly from queued to sent or failed, and cancellation works.
  • Unclaimed listing cron only affects the intended unverified listings.
  • License and update screens remain unchanged and functional.