Final Project – Complete Contact Form 7 Addon Development — a practical guide to Contact Form 7 addon final project with clear examples you can reuse in real projects.
Contact Form 7 Tutorial Series (100/100). Prefer one article? Read the complete Contact Form 7 tutorial.
Short description
Create a professional addon that requires CF7, stores API settings, selects forms to sync, posts submission JSON to an endpoint on `wpcf7_mail_sent`, logs failures, and ships with readme + test checklist.
Steps
- Define API destination and payload shape.
- Implement settings + mail_sent sync.
- Add logging and failure handling.
- Document and test on staging.
Final project scope
1. Plugin bootstrap + WPCF7_VERSION check
2. Settings page (API URL, key, form IDs)
3. wpcf7_mail_sent handler
4. wp_remote_post with timeout + logging
5. Admin notice if CF7 missing
6. readme.txt + changelog
7. Staging test checklist
Starter bootstrap
<?php
/**
* Plugin Name: Acme CF7 Sync
* Description: Final project — sync CF7 submissions to an API.
* Version: 1.0.0
* Text Domain: acme-cf7-sync
*/
if (! defined('ABSPATH')) {
exit;
}
add_action('plugins_loaded', function () {
if (! defined('WPCF7_VERSION')) {
add_action('admin_notices', function () {
echo '<div class="notice notice-error"><p>Acme CF7 Sync requires Contact Form 7.</p></div>';
});
return;
}
require_once __DIR__ . '/includes/class-acme-cf7-sync.php';
AcmeCF7SyncPlugin::instance(__FILE__)->boot();
});