WP Manifestindependent plugin directory
manifest / users / pm-registration-extra

PM Registration Extra Fields

Custom WordPress Plugin developed.

by You · github.com/meshwa17/pm-registration-extra · website

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/meshwa17/pm-registration-extra/archive/refs/heads/main.zip

Readme

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

  1. Install and activate WordPress.

  2. Install and activate WooCommerce.

  3. Download or clone this repository.

  4. Copy the plugin folder into:

    wp-content/plugins/

  5. Go to:

    WordPress Admin → Plugins

  6. Find WooCommerce Registration + Private Profile Image.

  7. 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:

  1. Go to:

    WooCommerce → Settings → Accounts & Privacy

  2. Enable:

    Allow customers to create an account during checkout

  3. Save the settings.

  4. Open the WooCommerce checkout page.

  5. Select/create the customer account.

  6. Verify that the DOB and Profile Image fields are displayed.

  7. 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.

Read the full README on GitHub →