WPPF Test Plugin is a small demonstration plugin and reference implementation built on top of the WordPress Plugin Framework. It shows how to structure a plugin around framework modules, custom post types, post meta schemas, WooCommerce email integration, and versioned upgrade routines.
This repository serves as the reference implementation for the WordPress Plugin Framework (WPPF).
If you're learning how to structure a plugin using WPPF, this project demonstrates the recommended conventions for:
- plugin bootstrapping
- module discovery
- custom post types
- structured post meta with validation
- WooCommerce integration
- upgrade routines
For the framework itself, see:
https://github.com/kyle-niemiec/wp-plugin-framework
- Registers a custom post type named
Test Posts(wppf_test_posts)- Adds a primary meta box for managing structured post meta on that post type
- Validates meta values through a schema before saving
- Tracks save timestamps for each test post
- Adds a side meta box on the edit screen only
- Registers a WooCommerce email class for a test email template
- Includes a sample upgrade schema class
- Adds a staging-detection notice through WPPF
- WordPress
- WooCommerce
This plugin extends WPPF\v1_2_3\WooCommerce\WooCommerce_Plugin, so WooCommerce must be installed in order to enable it.
- Download the latest release ZIP file of the WPPF Test Plugin
- Install the plugin through the "Add Plugin" page in WordPress.
- Activate WooCommerce if it is not already active.
- Activate the
WPPF Test Plugin.
kyle-niemiec/wp-plugin-frameworkkyle-niemiec/wppf-update-helper
The plugin registers a public custom post type:
The post type class can be found here:
Each test post stores structured meta in _wppf_test_post_data with the following fields:
current_string— string, validated to letters, numbers, and spacesis_toggle_active— boolean toggletimes_saved— array of Unix timestamps
The schema and export logic live in:
This class demonstrates how WPPF can define structured post meta with validation rules.
The primary meta box demonstrates several common patterns:
- Rendering saved timestamps
- Clearing previous field data
- Editing a validated string field
- Toggling a boolean field
- Appending a new timestamp every time the post is saved
Relevant files:
admin/includes/meta-boxes/class-wppf-test-post-meta-box.phpadmin/templates/test-post-meta-box-template.php
There is also an edit-screen-only side meta box example located in:
admin/includes/meta-boxes/class-wppf-test-post-edit-screen-meta-box.phpadmin/templates/edit-screen-test-meta-box-template.php
The plugin includes a sample WooCommerce email implementation:
The email class and template live in:
The module checks for a wppf-test-email query parameter during init and triggers the email sender when it is present.
See:
Versioned upgrade logic is demonstrated here:
This class registers an upgrade routine for plugin version 1.0.3 and serves as a template for implementing real migration tasks.
Important entry points include:
-
Main plugin file
-
Admin module
This repository is intended to be read as a reference implementation for WPPF rather than a production plugin.
This project is part of the WPPF ecosystem:
WordPress Plugin Framework (WPPF) – Core plugin architecture framework
WPPF Test Plugin – Example project demonstrating a implementation of a plugin using WPPF.
WP Plugin Update Server – Self-hosted WordPress plugin update infrastructure with GUI management.
WPPF Update Helper – Simple integration layer for the WP Plugin Update Server.
Documentation:

