WP Quote Management
A custom WordPress plugin for managing service quote requests. Features a frontend form via shortcode and an admin interface for reviewing, approving, or rejecting quotes.
by Adrian T. Saycon · github.com/adzadzadz/wp-quote-management · 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/adzadzadz/wp-quote-management/archive/refs/heads/main.zipWP Quote Management Plugin
A WordPress plugin that provides a frontend quote form and admin management for quotes, with a toggle for storage as a custom database table or custom post type (CPT).
Features
- Frontend shortcode form:
[bonza_quote_form] - Fields: Name, Email, Service Type, Notes
- Stores quotes as either DB table or CPT (toggle in settings)
- Admin menu to view and manage quotes
- Status management: Pending, Approved, Rejected
- Admin email notification on new quote
- Extensible via actions/filters
Installation
- Copy the
wp-quote-managementfolder to yourwp-content/plugins/directory. - Activate the plugin from the WordPress admin.
- Visit Settings > Bonza Quote to choose storage type.
- Use the
[bonza_quote_form]shortcode on any page.
Usage
Displaying the Quote Form
To display the quote form on any page or post, simply add the following shortcode to your content editor:
[bonza_quote_form]
This will render a form with fields for Name, Email, Service Type, and Notes. When a user submits the form, the quote will be stored according to your selected storage method.
Switching Storage Method
You can choose how quotes are stored—either in a custom database table or as a custom post type (CPT).
To switch storage usage:
- Go to your WordPress admin dashboard.
- Navigate to Settings > Bonza Quote (found in the left sidebar).
- In the settings page, select your preferred storage method (Database Table or Custom Post Type).
- Save your changes.
All new quotes will now be stored using the selected method. You can change this setting at any time.
Automated Testing
Requirements
- PHPUnit
- WordPress test environment (see https://make.wordpress.org/core/handbook/testing/automated-testing/)
Running Tests
-
From the plugin directory, run:
phpunit -
Tests are located in the
tests/directory.
Extensibility
- Action:
wqm_quote_submittedfires after a quote is submitted.
Security
- All inputs are sanitized and validated.
- Nonces are used for form and admin actions.