Installation & Activation
Upload the Plugin
Go to Plugins → Add New → Upload Plugin. Select wp-invoice-manager.zip and click Install Now.
Activate
Click Activate Plugin. Creates the wp_wpim_line_items table. Seeds the invoice counter at 1000 (first invoice will be INV-1001). Adds manage_invoices to Administrators.
Configure Settings
Navigate to Invoices → Settings. Enter Company Name, Company Email, Currency Symbol, Tax Rate (%), and Invoice Prefix.
Create Your First Invoice
Go to Invoices → Create Invoice. Fill in Client Details, Invoice Details, and Line Items. The invoice number is assigned automatically on first save.
Set Up Client Portal
Create a WordPress page, add [my_invoices], and publish it. Clients log in and see their invoices matched by email address.
Plugin Features
Invoices CPT
Dedicated admin area. List table shows invoice number, client, amount (with tax), due date, and status badge.
Auto Invoice Numbers
Sequential numbers assigned on first save using an Options API counter. Prefix configurable in settings.
Line Items DB
Custom wpim_line_items table stores each service row. Live calculation of subtotal, tax, and grand total.
Email & Reminders
Send invoice and payment reminder emails directly from the invoice list with one click via wp_mail().
Mark as Paid
One-click AJAX status update from the invoice list. Updates instantly without a page reload.
Dashboard Widget
Total revenue (paid invoices) and outstanding invoice count shown on the WordPress admin home page.
REST API
GET invoices endpoint (agent auth) and POST /pay webhook endpoint for payment gateway integration.
Client Portal
[my_invoices] shortcode shows invoices where client email matches the logged-in user's WordPress email.
Shortcode & REST API
Client Invoice Portal
Shows the logged-in client's invoices. The client email in the invoice's Client Details box must exactly match their WordPress user email.
[my_invoices] [my_invoices limit="10"]
| Attribute | Default | Description |
|---|---|---|
limit | 20 | Maximum number of invoices to display in the portal. |
Invoice Statuses
| Status | Meaning | How to Set |
|---|---|---|
Draft | Created, not yet sent to client | Default on creation |
Sent | Emailed, awaiting payment | Manually after sending |
Paid | Payment received | Click ✓ Mark Paid in list or via REST webhook |
Overdue | Past due date, unpaid | Set manually when deadline passes |
REST API
GET /wp-json/wpim/v1/invoices ?status=sent (requires manage_invoices) POST /wp-json/wpim/v1/invoices/{id}/pay X-WPIM-Secret header required