PM Registration Extra Fields
Custom WordPress Plugin developed.
by You · github.com/meshwa17/pm-registration-extra · website
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/meshwa17/pm-registration-extra/archive/refs/heads/main.zipReadme
WooCommerce Registration + Private Profile Image
A custom WooCommerce extension that adds required Date of Birth (DOB) and Profile Image fields to the WooCommerce customer registration form.
The profile image is stored privately and is not added to the WordPress Media Library or exposed through a public URL.
Requirements
- WordPress latest stable version
- WooCommerce
- PHP 8.0+
- MySQL 5.7+ / MariaDB 10.4+
Required Plugin
WooCommerce
WooCommerce must be installed and activated before activating/using this plugin.
The plugin extends the WooCommerce customer registration functionality.
Installation
-
Install and activate WordPress.
-
Install and activate WooCommerce.
-
Download or clone this repository.
-
Copy the plugin folder into:
wp-content/plugins/ -
Go to:
WordPress Admin → Plugins
-
Find WooCommerce Registration + Private Profile Image.
-
Click Activate.
WooCommerce Configuration
Enable Customer Account Creation
For the WooCommerce registration form to be available, make sure customer account creation is enabled.
Go to:
WordPress Admin → WooCommerce → Settings → Accounts & Privacy
Enable the option that allows customers to create an account during checkout.
For the classic checkout bonus functionality, enable:
Allow customers to create an account during checkout
Then click:
Save changes
Registration Form
The plugin adds the following required fields to the WooCommerce customer registration form:
Date of Birth
- Required field
- Must be a valid date
- Future dates are rejected
- Date is stored in user meta
User meta key:
pm_dob
Profile Image
- Required field
- Allowed formats:
- JPG
- PNG
- WebP
- Maximum file size: 2MB
- MIME type and extension are validated
- Image is not stored in the WordPress Media Library
- Image is stored in a private location
- Image does not have a public URL
User meta key:
pm_profile_image_path
Classic Checkout Account Creation
The same DOB and Profile Image fields are also available in the classic WooCommerce checkout account creation section.
To test this functionality:
-
Go to:
WooCommerce → Settings → Accounts & Privacy
-
Enable:
Allow customers to create an account during checkout
-
Save the settings.
-
Open the WooCommerce checkout page.
-
Select/create the customer account.
-
Verify that the DOB and Profile Image fields are displayed.
-
Submit the checkout and verify that the data is saved.
Private Profile Image
Profile images are intentionally not stored in the WordPress Media Library.
The stored value in user meta is an internal/private file reference rather than a public image URL.
Images can only be viewed by:
- The logged-in user who owns the image
- WordPress administrators
Direct public access to the image is prevented.
User Meta
The plugin stores:
| Meta Key | Description |
|---|---|
pm_dob |
Customer date of birth |
pm_profile_image_path |
Private profile image path/reference |
Display
The saved information is displayed on:
My Account
- DOB
- Profile image
WordPress Admin → Users → Edit User
- DOB
- Profile image preview
Security
- Input validation and sanitization
- MIME type validation
- File extension validation
- File size validation
- Secure file naming
- Ownership checks
- Admin capability checks
- No public image URL stored in user meta
- Private image delivery
- Nonces where applicable
Testing
Test the following scenarios:
- Valid DOB
- Future DOB
- Invalid DOB
- No profile image
- Invalid image format
- JPG image
- PNG image
- WebP image
- Image larger than 2MB
- Valid image under 2MB
- Registration through My Account
- Registration through classic checkout
- Owner viewing their profile image
- Non-owner attempting to access another user's image
- Admin viewing a user's profile image
Notes
The classic checkout account creation functionality depends on the WooCommerce account creation setting being enabled.
The plugin is designed to work with WooCommerce's standard customer registration and classic checkout account creation flow.