Distributor Registration
Distributors Registration Form for Wordpress
by BabyBrands · github.com/cjbodullo/distributors-registration-plugin
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/cjbodullo/distributors-registration-plugin/archive/refs/heads/main.zipWordPress plugin: multi-step distributor application form, local CSS only (no Bootstrap vendor), data stored in {prefix}dis_* tables.
Installation
- Copy the
distributors-registration-pluginfolder intowp-content/plugins/. - Activate Distributor Registration in Plugins.
- On first load, missing database tables are created via
dbDelta().
Shortcodes
Two tags render the same form:
| Tag | Notes |
|---|---|
[distributor_registration_form] |
Primary tag |
[distributorregistration] |
Short alias |
Attributes
| Attribute | Default | Description |
|---|---|---|
thank_you_url |
(empty) | After a successful submit, redirect here. If empty, the user returns to the same page (thank-you UI is shown inline). Must be allowed by wp_validate_redirect(). |
contact_email |
info@babybrands.com |
Email shown on the thank-you screen. Can be overridden with the filter below. |
Example usage (copy into a page or block)
<!-- Default: thank-you on same page, contact email info@babybrands.com -->
[distributor_registration_form]
<!-- Custom thank-you page (absolute URL on this site is typical) -->
[distributor_registration_form thank_you_url="https://example.com/thank-you/"]
<!-- Custom contact email on thank-you screen -->
[distributor_registration_form contact_email="info@example.com"]
<!-- Both attributes -->
[distributor_registration_form thank_you_url="https://example.com/done/" contact_email="support@example.com"]
<!-- Alias shortcode, same behavior -->
[distributorregistration thank_you_url="https://example.com/done/"]
Developer filter
dreg_distributor_registration_contact_email—( string $email, string $shortcode_tag )— adjust the thank-you contact email per shortcode tag.
Technical notes
- Form posts to
admin-post.phpwithaction=dreg_distributor_register(seeDREG_POST_ACTIONin the main plugin file). - Success/error feedback uses query args
dreg_dr_statusand optionaldreg_dr_message; the shortcode removes them from the URL withhistory.replaceStateafter display. - Styles:
assets/css/distributor-registration.cssonly (no CDN, no vendor CSS).
Database
Logical tables (prefix dis_): country, province, city, address, distributors, distributors_status, distributors_distribution_plan, distributors_doctors. Table resolution supports legacy non-prefixed names when present.
Reference SQL (manual installs / documentation): schema/distributor_registration.sql in this plugin folder. Prefer letting the plugin run dbDelta() on activation / init.