At Rest Adv Invoices
A plugin to create invoices for advertisements
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/pavloborysenko/at-rest-adv-invoces/archive/refs/heads/main.zipWordPress plugin for creating WooCommerce invoices from advertisement posts.
1. Main Functionality
This plugin automatically generates WooCommerce orders (invoices) for advertisement posts. It adds a meta box to the advertisement post editor with the following features:
- Date Picker: Select the billing date for the invoice (past dates only)
- Auto-filled Fields: Year and month are automatically populated based on the selected date
- Invoice amount: You can set a custom price for the invoice. By default, the price is taken from the product
- Create Invoice Button: Generates a WooCommerce order with advertiser billing information
- Orders List: Displays all previously created orders for the current advertisement with status and direct links
- Custom Column: Shows order information in the advertisements list table
The plugin retrieves advertiser billing data (company name, email, phone, address, VAT number) from the advertisement post meta fields and creates a properly formatted WooCommerce order.
2. Settings
Requirements
- WooCommerce must be activated
- Advertisement custom post type must exist
- ACF field
ad_typemust be configured with advertisement type choices - WooCommerce products in the "advertisement" category must be created
Configuration
- Navigate to Adv Invoices Settings page (hidden menu, direct URL:
/wp-admin/admin.php?page=adv-invoices-settings) - Map each advertisement type to a corresponding WooCommerce product
- Save settings
Required Post Meta Fields
Each advertisement post must have:
advertiser- Advertiser post IDad_type- Advertisement type (matches ACF field choices)
Each advertiser post must have:
company_name- Company namecontact_name- Contact person nameemail- Email addressphone- Phone numberaddress- Billing addressvat_number- VAT number (optional)
3. Troubleshooting
Plugin won't activate
- Ensure WooCommerce is installed and activated first
"Product not found for ad type" error
- Check that advertisement types are mapped to products in settings
- Verify the advertisement has a valid
ad_typemeta field
"Advertiser not found" error
- Ensure the advertisement post has a valid
advertisermeta field with an existing post ID
Orders not showing in meta box
- Check that orders were created successfully
- Verify orders have the
_advertisement_idmeta field
Billing data missing in order
- Verify advertiser post has all required meta fields populated
- Check meta field names match exactly
4. Testing Notes
If the plugin is disabled, the old invoice system will work.
Verify invoice creation on the banner page (for different advertisers, with complete and incomplete advertiser data).
On the order page, verify all advertiser data.
Verify how PDFs are generated for advertisements and for monthly payments.
Verify email sending from the order page for advertisements and for monthly payments.
Verify the payment link in the email.
5. Changelog
v1.1.0 - January 21, 2026
- Added custom invoice amount
v1.0.1 - January 15, 2026
- Added custom column to advertisements list showing invoice information
- Fixed date formatting in orders list
- Improved error handling for missing advertiser data
v1.0.0 - January 13, 2026
- Initial release
- Invoice meta box with date picker
- WooCommerce order creation from advertisement data
- Settings page for ad type to product mapping
- Orders list display in meta box
- AJAX-based order creation with loading states