feat: complete TradeQuote AI — all spec features, security fixes, CI/CD #3945
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/-AI-Quote-to-Invoice-for-Trades/pull/3
What's in this PR
Full completion of the TradeQuote AI plugin, closing all 42 gaps identified in a post-v1 audit. 26 files changed, ~1,936 lines added/modified.
Security & Bug Fixes
ai/generateandquotesPOST now return HTTP 402 before hitting Claude or the DB when free tier is exhausted.htaccess(Deny from all) +index.phpwritten on first PDF save so generated PDFs can't be enumeratedesc_url_raw()instead ofsanitize_text_field()(which stripped URL characters)UNIQUE KEYonquote_numberandinvoice_number;acceptance_tokenalso uniqueNew Features
Freemius Licensing (
class-tqa-freemius.php)vendor/freemius/wordpress-sdk/start.phptqa_is_pro(),tqa_can_create_quote(),tqa_quota_remaining()helper functions used throughoutPublic Quote Acceptance Portal (
class-tqa-public.php)/?tqa_accept=TOKEN— no WordPress login requiredGET /public/quotes/{token}andPOST /public/quotes/{token}/respondacceptance_tokencolumn (added viadbDelta)Trade-Specific AI Prompts (
class-tqa-ai.php)trade_typeparam passed from React to REST to Claudetest_api_key()method for Settings page validationReact Settings Page (
src/components/SettingsPage.jsx)wp.media)<noscript>fallbackAdmin Notices (
class-tqa-admin-notices.php)UI Improvements
admin-post.php+pdfNonce), inline date picker modal for invoice conversion, search bar, copy-to-clipboard acceptance link buttonprompt()callsCI/CD
build.ymlrelease.ymlv*.*.*tag pushcomposer install --no-dev→rsyncclean package → zip → GitHub Releasebin/make-zip.sh— same packaging logic for local use.Files Added/Changed
New PHP:
class-tqa-freemius.php,class-tqa-public.php,class-tqa-admin-notices.phpNew React:
SettingsPage.jsxNew templates:
quote-acceptance.phpNew assets:
placeholder-logo.svg,languages/.gitkeepNew CI:
.github/workflows/build.yml,.github/workflows/release.yml,bin/make-zip.shUpdated: all core PHP classes, all React components,
admin.cssTest plan
npm install && npm run build→ bundle generated atadmin/js/app/index.jsv1.0.1→ GitHub Actions builds and attaches zip to releasehttps://claude.ai/code/session_01SYko81ETdN3uyZ8GVdH1s5
Generated by Claude Code