This commit introduces a complete announcement management system for HVAC trainers
with enterprise-grade security, performance optimization, and email notifications.
## Core Features
- Custom post type for trainer announcements with categories and tags
- Role-based permissions (master trainers can create/edit, all trainers can read)
- AJAX-powered admin interface with real-time updates
- Modal popup viewing for announcements on frontend
- Automated email notifications when announcements are published
- Google Drive integration for training resources
## Security Enhancements
- Fixed critical capability mapping bug preventing proper permission checks
- Added content disclosure protection for draft/private announcements
- Fixed XSS vulnerabilities with proper output escaping and sanitization
- Implemented permission checks on all AJAX endpoints
- Added rate limiting to prevent abuse (30 requests/minute)
- Email validation before sending notifications
## Performance Optimizations
- Implemented intelligent caching for user queries (5-minute TTL)
- Added cache versioning for announcement lists (2-minute TTL)
- Automatic cache invalidation on content changes
- Batch email processing to prevent timeouts (50 emails per batch)
- Retry mechanism for failed email sends (max 3 attempts)
## Technical Implementation
- Singleton pattern for all manager classes
- WordPress coding standards compliance
- Proper nonce verification on all AJAX requests
- Comprehensive error handling and logging
- Mobile-responsive UI with smooth animations
- WCAG accessibility compliance
## Components Added
- 6 PHP classes for modular architecture
- 2 page templates (master announcements, trainer resources)
- Admin and frontend JavaScript with jQuery integration
- Comprehensive CSS for both admin and frontend
- Email notification system with HTML templates
- Complete documentation and implementation plans
This system provides a secure, scalable foundation for trainer communications
while following WordPress best practices and maintaining high code quality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created WORDPRESS-BEST-PRACTICES.md with complete WP standards guide
- Created TESTING-GUIDE.md with E2E testing procedures and display session setup
- Updated CLAUDE.md with JavaScript simplification and recent fixes
- Enhanced main docs README with new documentation links
- Added guidance on MCP Playwright usage vs standard Playwright
- Documented proper role checking (roles vs capabilities)
- Included display session configuration for headless testing
- Added production testing checklists and debug procedures
Key additions:
- How to use jQuery properly in WordPress (no compatibility layers needed)
- Display session setup (DISPLAY=:0) for Playwright testing
- Security best practices with proper examples
- Common pitfalls and solutions
- Test user accounts for staging/production
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unnecessary jQuery compatibility layers (200 lines)
- Update community-login.js to use standard WordPress jQuery patterns
- Use jQuery(document).ready() instead of complex compatibility checks
- Remove hvac-jquery-compatibility-fix.js and related PHP class
- Follows WordPress convention of jQuery in no-conflict mode
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed z-index layering with !important rules for proper navigation stacking
- Enhanced CSS file loading detection with multiple page identification methods
- Added comprehensive header overlap prevention for all Astra theme header elements
- Improved event edit page detection to handle URL patterns and page IDs
- Verified all fixes working on staging with proper navigation visibility
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Redesigned event edit form to match registration page styling patterns
- Added professional card-based layout with proper shadows and borders
- Implemented consistent color scheme using HVAC brand colors (#0274be)
- Added proper spacing, typography, and form field styling
- Improved responsive design for mobile devices
- Enhanced form sections with dashed underlines and proper hierarchy
- Styled buttons to match registration page (primary/secondary)
- Added proper focus states and transitions for accessibility
- Implemented CSS custom properties for consistent theming
- Added print styles and reduced motion support
Event edit page now has polished, professional appearance matching other trainer pages.
🤖 Generated with Claude Code (https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed permission check in canUserEditEvent() method to properly check user roles
- Changed from checking non-existent 'hvac_trainer' capability to in_array('hvac_trainer', $user->roles)
- Trainers can now create new events and edit their own events
- Security maintained: trainers cannot edit others' events
- Added initial CSS file to fix narrow width and navigation z-index issues
- Page now displays at proper 1200px max width matching other trainer pages
- Navigation menu no longer hidden under site header (z-index: 100)
🤖 Generated with Claude Code (https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added page ID 6177 detection for reliability
- Using multiple detection methods (page ID, slug, URL)
- Works around WordPress limitation of not loading plugin templates via page template assignment
- Added missing template_include filter to HVAC_Custom_Event_Edit class
- Added loadTemplate method to handle template loading for rewrite rules
- Added support for hierarchical URL /trainer/event/edit in load_custom_templates
- Created WordPress page at /trainer/event/edit/ for custom form
- Assigned page-edit-event-custom.php template to the page
This ensures the custom event edit form loads correctly without JavaScript dependencies
- Re-enabled HVAC_Event_Edit_Comprehensive class initialization
- Added proper file includes for event edit classes
- Updated JavaScript to wait for TEC form to fully load via AJAX
- Fixed field selectors to match actual form structure
- Increased timeouts to handle AJAX form rendering
- Prioritized correct selectors for form fields
The comprehensive fix now properly loads event data and populates fields
when editing events from the trainer dashboard.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Created comprehensive field mapping documentation for TEC v5.0.8
- Documented all meta keys, input selectors, and field types
- Built validation tests using correct TEC v5.0.8 selectors
- Verified working selectors through staging environment testing
- Added best practices guide with implementation patterns
- Included JavaScript and PHP code examples
- Documented common issues and solutions
- Added debugging tips and performance optimizations
Test results show successful field discovery and persistence:
- Title, Start Date, End Date, and URL fields verified working
- Cost field may be hidden when Events Tickets is active
- All date/time fields use expected selectors
- Venue and organizer fields use array notation in names
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Created admin page for direct event seeding (admin/seed-events-direct.php)
- Added test admin user creation script with master trainer roles
- Implemented comprehensive Playwright tests for event edit workflow
- Verified field population with TEC v5.0.8
- Confirmed 11 core fields properly populate in edit forms
- Added XWayland display configuration for headed browser testing
- Created seeding scripts that add events with complete metadata
Test Results:
- Login functionality: Working
- Event access: 20+ events accessible
- Field population: 11 essential fields confirmed
- Edit workflow: Functional with TEC Community Events
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Added mobile navigation fix CSS to resolve overlapping elements
- Created TEC integration pages (create, edit, my events)
- Implemented comprehensive Playwright E2E test suites
- Fixed mobile navigation conflicts with z-index management
- Added test runners with detailed reporting
- Achieved 70% test success rate (100% on core features)
- Page load performance optimized to 3.8 seconds
- Cross-browser compatibility verified
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Update includes/class-hvac-shortcodes.php:277 to use [tribe_community_events view="submission_form"]
- Update templates/page-manage-event.php:83 to use correct TEC shortcode format
- Fixes issue where event edit forms appeared blank instead of populated with existing data
- TEC submission_form view automatically detects event_id URL parameters for editing
- Enables proper event creation and editing functionality for trainers
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Commented out duplicate navigation in HVAC_Help_System class (lines 223-232)
- Documentation page template already renders navigation in page-trainer-documentation.php
- Prevents double navigation bar issue reported by user
- Help system shortcode navigation no longer needed with new template structure
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Create new WordPress page template for trainer documentation (page-trainer-documentation.php)
- Add editable documentation content via Gutenberg editor
- Implement automatic table of contents sidebar with smooth scrolling
- Create comprehensive help content covering:
- Platform overview and mission
- Core concepts (Events, Venues, Organizers, Tickets, RSVPs, Orders, Certificates)
- Profile customization guide
- Venue and organizer management
- Event creation and management process
- Event attendance tracking methods
- Certificate generation workflow
- Comprehensive FAQs section
- Support resources and contact information
- Add responsive design with mobile-friendly layout
- Include interactive TOC with active section highlighting
- Update deployment script to set correct page template
- Fix documentation page to use new template system
The documentation page now provides trainers with a complete guide to using the platform,
including step-by-step instructions for all major features and answers to common questions.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove hardcoded template override in class-hvac-community-events.php forcing old shortcode-based template
- Update dashboard to use refactored page-trainer-dashboard.php template with proper WordPress integration
- Fix navigation menu rendering by removing conflicting HVAC_NAV_RENDERED constant checks
- Add missing hvac-menu-system.css file to resolve navigation styling
- Update deployment script to automatically assign correct page template
- Clean up template files to use consistent navigation rendering approach
- Update documentation with dashboard refactoring details
The dashboard now displays correctly with working navigation across all trainer pages.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add essential data seeding scripts to version control
- Update .gitignore to whitelist bin/ directory for key testing scripts
- Include comprehensive test data creation for trainers, events, attendees, and certificates
- Scripts use environment variables for credentials (no hardcoded secrets)
- Supports both regular trainers and master trainers with proper roles
- Includes debugging and data enhancement utilities
Scripts included:
- create-comprehensive-test-data.sh: Full staging data setup with users/events/certificates
- create-staging-test-data.sh: Staging environment test data creation
- create-complete-test-data.sh: Complete test data with attendees and check-ins
- create-test-attendees.sh: Attendee and ticket order generation
- enhance-test-data-revenue.sh: Revenue data enhancement for testing
- fix-and-create-test-data.sh: Data fixing and creation combined
- debug-attendee-data.sh: Attendee data debugging utilities
- Add 13 critical CSS files that were missing from repository
- Fixes deployment issues on other machines/environments
- Files include dashboard, templates, certificates, and common styles
- All files force-added to override .gitignore CSS exclusions
🔧 Generated with Claude Code
Co-Authored-By: Ben Reed <ben@tealmaker.com>
- Add .claude/settings.local.json with project-specific permissions and MCP server settings
- Include CLAUDE.md project instructions and memory entries (already tracked)
- Update .gitignore to temporarily allow Claude configuration files
This is a temporary commit to preserve Claude Code configuration and project context.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add 26 documentation files including test reports, deployment guides, and troubleshooting documentation
- Include 3 CSV data files for trainer imports and user registration tracking
- Add 43 JavaScript test files covering mobile optimization, Safari compatibility, and E2E testing
- Include 18 PHP utility files for debugging, geocoding, and data analysis
- Add 12 shell scripts for deployment verification, user management, and database operations
- Update .gitignore with whitelist patterns for development files, documentation, and CSV data
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Document modal overlay issue and CSS specificity conflict solution
- Document excessive mobile padding issue and zero-padding fix
- Include specific file references and code examples
- Add deployment instructions for child theme CSS
Resolves issues with non-functional Apply button overlay and wasted
screen space on mobile devices for the find-a-trainer page.
- Added display:none !important, visibility:hidden !important, opacity:0 !important inline styles to modal
- Fixed CSS specificity issues preventing modal from being hidden
- Updated JavaScript to properly manage modal visibility state
- Incremented child theme version to 1.2.0 for cache busting
This resolves the non-functional Apply button overlay issue on mobile devices.
Root cause: CSS was setting display: flex by default which overrode
inline style="display: none" attribute on the modal element.
Solution: Changed .hvac-filter-modal default display to 'none' and
only show as 'flex' when .active or .show classes are present.
This ensures the modal respects inline styles and only appears
when explicitly activated by JavaScript.
Fixes modal overlay showing permanently on find-trainer page.
- CRITICAL: Reduce mobile padding waste from 30% to <10% screen usage
- Global mobile container padding: 20px → 10px → 5px (responsive breakpoints)
- Plugin content areas: 20px → 12px → 8px aggressive reduction
- Cards/panels: 15px → 8px → 6px minimal spacing
FIND-A-TRAINER PAGE MOBILE FIXES:
- Complete mobile layout redesign with vertical stacking
- Map height reduced to 200px on mobile devices
- Trainer cards: horizontal layout with 50px avatars
- Touch-optimized filters with 44px+ touch targets
- Search input: full-width with proper iOS zoom prevention
- Typography: compact sizing (16px → 13-15px)
- Ultra-tight spacing: 8px, 6px, 4px based on breakpoints
CHILD THEME INTEGRATION:
- hvac-mobile-responsive.css: Base aggressive mobile optimizations
- hvac-find-trainer-mobile.css: Find-a-trainer specific mobile fixes
- functions.php: Conditional loading and ultra-mobile body classes
- Progressive enhancement with content-based detection
MOBILE BREAKPOINT STRATEGY:
- 768px: 10px padding, stacked layout, single-column grids
- 480px: 8px padding, reduced typography, compact elements
- 375px: 5px padding, ultra-compact spacing, maximized content
FEATURES:
- Ultra-mobile body class system for maximum space usage
- Touch-optimized interface with proper accessibility
- Horizontal scrolling prevention and overflow fixes
- Mobile-first progressive enhancement approach
Deployed to staging with cache cleared and CSS files verified accessible.
Addresses user report of excessive mobile padding and find-a-trainer overflow issues.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Complete mobile-first responsive design implementation addressing all critical usability issues:
PRIORITY 1 (CRITICAL) - Responsive Tables:
- Converted dashboard events table to mobile card layout using CSS Grid/Flexbox
- Certificate reports table now displays as stacked cards on mobile screens
- Added data labels for all table cells using CSS pseudo-elements
- Touch-friendly action buttons with 44x44px minimum sizing
- Horizontal scroll indicators for overflow content
PRIORITY 2 (HIGH) - Registration Form Mobile UX:
- Implemented collapsible form sections with smooth animations
- Touch-friendly form fields with 16px font size (prevents iOS zoom)
- Enhanced input styling with 44px minimum height for accessibility
- Improved checkbox and radio button layouts
- Mobile-optimized submit button (52px height, full width)
PRIORITY 3 (MEDIUM) - Mobile Navigation Enhancement:
- Added hamburger menu toggle for mobile screens
- Touch-friendly navigation links (54px minimum height)
- Submenu expand/collapse functionality
- Outside-click menu closing behavior
- ARIA attributes for accessibility compliance
PRIORITY 4 (POLISH) - Content Spacing Improvements:
- Single-column layouts for screens under 480px
- Optimized padding/margins across all mobile breakpoints
- Enhanced focus indicators (3px solid outlines)
- Modal full-screen behavior on mobile devices
- Swipe-to-close functionality for mobile modals
Technical Implementation:
- Created hvac-mobile-responsive.css (889 lines) with comprehensive mobile styles
- Created hvac-mobile-responsive.js with interactive functionality
- Integrated with HVAC_Scripts_Styles system for conditional loading
- Added Safari browser compatibility checks and resource optimization
- Implemented touch device detection and enhanced interactions
Testing Results:
- Verified at 320px (iPhone SE) and 375px (iPhone 12) viewports
- All interactive elements meet WCAG 2.1 AA touch target requirements
- Form inputs properly sized to prevent mobile browser zoom
- Complete cross-device compatibility maintained
- Professional appearance across all breakpoints
Performance Optimizations:
- Conditional loading based on viewport detection
- Debounced resize event handlers
- Efficient CSS cascade prevention for Safari browsers
- Touch-optimized event handling with minimal performance impact
Files Modified:
- includes/class-hvac-scripts-styles.php: Added mobile asset loading
- assets/css/hvac-mobile-responsive.css: Complete responsive framework
- assets/js/hvac-mobile-responsive.js: Mobile interaction enhancements
- Multiple template files: Added mobile-specific optimizations
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Document successful Safari browser compatibility resolution:
- User confirmed: 'THE PAGE FINALLY LOADS IN SAFARI\!\!\!\!\!\!\!'
- Complete resolution of resource loading cascade issues
- Production-ready system with user verification
- Updated memory entries to reflect current working state
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added comprehensive production deployment verification entry to CLAUDE.md
- Confirmed all 40+ registration form fields functional in production
- Verified Business Type dropdown (11 options), Training Audience checkboxes (4 options)
- Validated dynamic Organization Headquarters country/state dropdowns
- Confirmed file upload functionality for profile images and organization logos
- Database verification completed: user creation, meta fields, organizer/venue posts
- Removed test data after successful verification
- Registration system fully operational with 100% test pass rate
Production deployment: https://upskillhvac.com/trainer/registration/
Test execution: Playwright E2E with complete form submission workflow
Database validation: All expected records created and properly stored
- Document all three form field optimizations
- Business Type dropdown, Training Audience 4 options, HQ dropdowns
- Reference to monitoring infrastructure warning
- All changes tested on staging and ready for production
Co-Authored-By: Ben Reed <ben@tealmaker.com>
- Changed headquarters country and state fields from text inputs to dropdown selections
- Added dynamic state/province loading based on selected country (US/Canada)
- Added 'Other' option for non-US/Canada countries with text input fallback
- Properly handle org_headquarters_state_other field in backend processing
- JavaScript handlers for dynamic country/state interaction
- Consistent with Training Venue Information dropdown behavior
Co-Authored-By: Ben Reed <ben@tealmaker.com>
Add complete enterprise-level reliability, security, and performance systems:
## Core Monitoring Systems
- **Health Monitor**: 8 automated health checks with email alerts and REST API
- **Error Recovery**: 4 recovery strategies (retry, fallback, circuit breaker, graceful failure)
- **Security Monitor**: Real-time threat detection with automatic IP blocking
- **Performance Monitor**: Performance tracking with automated benchmarks and alerts
## Data Protection & Optimization
- **Backup Manager**: Automated backups with encryption, compression, and disaster recovery
- **Cache Optimizer**: Intelligent caching with 3 strategies and 5 specialized cache groups
## Enterprise Features
- Automated scheduling with WordPress cron integration
- Admin dashboards for all systems under Tools menu
- REST API endpoints for external monitoring
- WP-CLI commands for automation and CI/CD
- Comprehensive documentation (docs/MONITORING-SYSTEMS.md)
- Emergency response systems with immediate email alerts
- Circuit breaker pattern for external service failures
- Smart cache warming and invalidation
- Database query caching and optimization
- File integrity monitoring
- Performance degradation detection
## Integration
- Plugin architecture updated with proper initialization
- Singleton pattern for all monitoring classes
- WordPress hooks and filters integration
- Background job processing system
- Comprehensive error handling and logging
Systems provide enterprise-grade reliability with automated threat response,
proactive performance monitoring, and complete disaster recovery capabilities.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Performance Improvements:
- Created CSS consolidation build process with 87KB combined file
- Reduces HTTP requests from 20+ CSS files to 1 consolidated file
- Added build script for automated CSS optimization
Background Job System:
- Implemented HVAC_Background_Jobs class with WordPress cron integration
- Supports geocoding batches, CSV imports, profile migrations, cache warming
- Queue management with priority, retry logic, and failure handling
- AJAX endpoints for job status monitoring and cancellation
Database Query Monitoring:
- Added HVAC_Query_Monitor for development and performance analysis
- Tracks slow queries (>0.1s), execution times, and memory usage
- Generates optimization recommendations automatically
- Admin interface for query analysis and debugging
- WP-CLI integration for command-line monitoring
Technical Details:
- Background jobs process 5 per batch with 3 retry attempts
- Query monitor logs only HVAC plugin queries to reduce noise
- Consolidated CSS maintains dependency order and includes 7 core files
- All systems include proper error handling and logging integration
Co-Authored-By: Claude <noreply@anthropic.com>
- Added should_use_consolidated_css() method to check for optimization
- Created enqueue_consolidated_css() for single-file CSS loading
- Split enqueue_page_specific_css() for reusable component loading
- Added HVAC_CSS_DEBUG constant support for development
- Maintains backward compatibility with individual file fallback
- Reduces HTTP requests from 20+ CSS files to 1 consolidated file
- Framework ready for consolidated CSS file generation
Co-Authored-By: Claude <noreply@anthropic.com>
- Added HVAC_Master_Dashboard_Data::clear_cache() static method
- Clears all 5 cached metrics when events or user data changes
- Added WordPress hooks for automatic cache invalidation:
- save_post/delete_post for events and ticket types
- user_register/deleted_user for trainer changes
- Ensures data consistency while maintaining performance benefits
- Cache keys organized under 'hvac_master_dashboard' group
Co-Authored-By: Claude <noreply@anthropic.com>
- Added wp_cache_get/set with 15-minute TTL to all expensive DB queries:
- get_total_events_count()
- get_upcoming_events_count()
- get_past_events_count()
- get_total_tickets_sold()
- get_total_revenue()
- Reduces database load for master dashboard by caching aggregate statistics
- Improves page load performance for master trainer users
- Cache keys use 'hvac_master_dashboard' group for organized cache management
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove commented debug error_log statements from registration class
- Remove verbose constructor logging from community events class
- Remove excessive info logging from page manager
- Improves code quality and reduces log noise in production
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove dangerous set_time_limit() calls in AJAX handlers to prevent resource exhaustion
- Restrict debug logging GET parameter access to administrators only
- Addresses remaining critical issues from security audit
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix production debug exposure in Zoho admin interface (WP_DEBUG conditional)
- Implement secure credential storage with AES-256-CBC encryption
- Add file upload size limits (5MB profiles, 2MB logos) with enhanced validation
- Fix privilege escalation via PHP Reflection bypass with public method alternative
- Add comprehensive input validation and security headers
- Update plugin version to 1.0.7 with security hardening
Security improvements:
✅ Debug information exposure eliminated in production
✅ API credentials now encrypted in database storage
✅ File upload security enhanced with size/type validation
✅ AJAX endpoints secured with proper capability checks
✅ SQL injection protection verified via parameterized queries
✅ CSRF protection maintained with nonce verification
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated default email in HVAC_Activator from support@upskillevents.com to joe@upskillhvac.com
- Added email obfuscation methods (obfuscate_email, encode_email) to HVAC_Page_Manager
- Updated registration pending template to use {support_email_encoded} placeholder
- Added JavaScript and HTML entity protection against email harvesting bots
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Ben Reed <ben@tealmaker.com>
- Replace wp_cache_delete_group() with backward-compatible alternative
- Add function_exists() check before calling wp_cache_delete_group()
- Use wp_cache_flush() as fallback for older WordPress versions
- Fixes fatal error when creating new trainer users on staging
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive Training Leads system for HVAC trainers
* New /trainer/training-leads/ page with tabular contact submission display
* HVAC_Training_Leads class with AJAX status updates and filtering
* Empty state messaging and profile sharing CTA
* Database integration with existing contact forms system
- Restructure trainer navigation menu for better UX
* Rename "Customize" to "Profile" with logical groupings
* Move "Logout" under "Profile" submenu
* Change "Personal Profile" to "Trainer Profile"
* Add "Training Leads" under Profile section
* Update help menu to show only question mark icon positioned far right
- Enhance documentation system
* Fix /trainer/documentation/ page styling and navigation integration
* Update content to reflect current platform features
* Add Training Leads documentation and navigation guide
* Implement proper WordPress template structure
- Update user management
* Change joe@upskillhvac.com display name to "Joe Medosch"
* Assign Joe as author of measureQuick headquarters venue
* Assign Joe as author of measureQuick and Upskill HVAC organizers
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
• Resolved critical MapGeo marker correlation issue where all clicks showed "William Ramsey"
• Replaced complex 600+ line console interception with streamlined 150-line solution
• Implemented simplified MapGeo custom action system using direct profile ID correlation
• Added Champions detection to prevent modal popups for measureQuick Champions
• Implemented certification_color field with automatic hex color assignment:
- Certified measureQuick Champion: #f19a42
- Certified measureQuick Trainer: #5077bb
- Others/Default: #f0f7e8
• Added automatic color migration for existing trainer profiles
• Enhanced AJAX handler to return both certification_type and certification_color
• Deployed complete solution to staging with 295 markers detected
• System now shows correct trainer modals with perfect correlation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Ben Reed <ben@tealmaker.com>
- Created Find a Trainer page with interactive map and trainer directory
- Integrated MapGeo plugin for displaying 45+ geocoded trainer locations
- Built advanced filtering system (State/Province, Business Type, Training Format, Training Resources)
- Implemented trainer profile cards with View Profile and See Events buttons
- Added contact form handler with validation and email notifications
- Created database table for tracking contact submissions
- Responsive design with mobile-friendly layout
- AJAX-powered search and filter functionality
- Pagination support for trainer directory
- Call to action for trainer registration
Technical Implementation:
- HVAC_Find_Trainer_Page: Main page handler with custom template
- HVAC_MapGeo_Integration: Map marker management for trainer locations
- HVAC_Contact_Form_Handler: Form processing with rate limiting
- HVAC_Trainer_Directory_Query: Advanced querying with caching
- HVAC_Contact_Submissions_Table: Database operations for submissions
Tested with existing 53 trainer profiles, 45 geocoded locations
Page live at: /find-a-trainer/
Co-Authored-By: Ben Reed <ben@tealmaker.com>
COMPREHENSIVE CSV IMPORT SYSTEM REDESIGN
Problem Resolved:
- Trainer profiles missing critical information from CSV_Trainers_Import_1Aug2025.csv
- Existing import system used hardcoded data instead of reading actual CSV file
- Missing 19 fields of professional information including phone numbers, websites, certifications
Solution Implemented:
- Complete enhanced CSV import system reading actual CSV file with 43 trainer records
- Full taxonomy integration for business_type and training_audience classifications
- Comprehensive field mapping for all 19 available CSV fields
- Multi-value taxonomy handling for comma-separated fields
- Automatic venue/organizer creation based on CSV flags
Key Components Added:
- includes/enhanced-csv-import-from-file.php: Main CSV import class with comprehensive processing
- Updated includes/class-hvac-geocoding-ajax.php: Enhanced AJAX integration
- includes/taxonomy-migration.php: Safe data migration utilities
- Comprehensive error handling, progress tracking, and logging
Fields Now Imported:
- Contact: Name, Email, Phone, Website
- Professional: Company, Role, Certification details (date, type, status)
- Location: Country, State, City
- Taxonomies: Business Type, Training Audience with multi-value support
- System: Application Details, User ID, Venue/Organizer creation flags
Testing Results:
- 43 CSV rows processed successfully
- 43 trainer profiles updated with enhanced data
- Proper taxonomy assignments with comma-separated value handling
- Automatic venue/organizer creation
- Zero errors during import process
- Complete data integrity preserved
TAXONOMY SYSTEM ENHANCEMENTS
Trainer Profile Taxonomy Implementation:
- WordPress taxonomies for business_type and training_audience
- Dynamic form loading from taxonomy terms with fallback support
- Multi-value checkbox and radio interfaces
- Safe data migration from text fields to taxonomies
Template Updates:
- templates/template-edit-profile.php: Dynamic taxonomy loading
- templates/page-master-trainer-profile-edit.php: Enhanced taxonomy management
- templates/page-master-dashboard.php: Fixed critical PHP fatal error
Critical Bug Fixes:
- Fixed HVAC_Community_Events::get_instance() undefined method error
- Master dashboard template now uses correct instance() method
- Eliminated PHP fatal errors preventing master trainer access
COMPREHENSIVE TESTING & VALIDATION
E2E Testing with Playwright:
- 87.5% test pass rate (7/8 tests passing)
- Registration form taxonomy integration verified
- Profile editing with taxonomy selections confirmed
- Data persistence across sessions validated
- Comprehensive visual evidence captured
Documentation Updates:
- docs/API-REFERENCE.md: Complete CSV import AJAX endpoint documentation
- docs/DEVELOPMENT-GUIDE.md: CSV import architecture and best practices
- docs/README.md: Enhanced system overview with CSV import features
- CLAUDE.md: Comprehensive memory entry for future reference
Production Impact:
- Complete trainer profiles with professional information
- Enhanced business categorization through taxonomy system
- Automatic event management preparation with venues/organizers
- Improved master trainer dashboard functionality
- Zero data loss with comprehensive error handling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
HVAC trainer profile geocoding system with outstanding results:
- 45 out of 53 trainer profiles successfully geocoded (85% coverage)
- Coverage spans 15+ US states and 3 Canadian provinces
- Google Maps API integration with intelligent rate limiting
- Real-time statistics and comprehensive error handling
Core Implementation:
- HVAC_Geocoding_Ajax class with three AJAX endpoints:
* hvac_trigger_geocoding: Manual geocoding operations
* hvac_run_enhanced_import: CSV location data population
* hvac_get_geocoding_stats: Coverage monitoring and statistics
- Enhanced CSV import with corrected email field mapping
- Proper field priority mapping for location data extraction
- Automatic scheduling of geocoding operations after data import
Technical Features:
- Singleton pattern for proper class initialization
- WordPress AJAX security with nonce verification
- Role-based access control for master trainers
- Comprehensive error logging and status tracking
- API rate limiting (0.5s delays) to respect Google quotas
- Multiple address format support (US/International)
User Experience:
- Master trainer controls for manual geocoding triggers
- Real-time progress monitoring and statistics
- Detailed error reporting for failed geocoding attempts
- Production-ready interface for location data management
Documentation:
- Complete API reference with endpoint specifications
- Comprehensive manual geocoding system documentation
- Usage examples and troubleshooting guidelines
- Error codes and integration patterns
🚀 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit implements a complete trainer profile custom post type system with the following components:
## Core Features Implemented:
- Custom post type 'trainer_profile' with full CRUD operations
- Bidirectional data synchronization between wp_users and trainer profiles
- Google Maps API integration for geocoding trainer locations
- Master trainer interface for profile management
- Data migration system for existing users
## Key Components:
1. **HVAC_Trainer_Profile_Manager**: Core profile management with singleton pattern
2. **HVAC_Profile_Sync_Handler**: Bidirectional user-profile data synchronization
3. **HVAC_Geocoding_Service**: Google Maps API integration with rate limiting
4. **HVAC_Trainer_Profile_Settings**: Admin configuration interface
5. **Migration System**: Comprehensive user meta to custom post migration
## Templates & UI:
- Enhanced trainer profile view with comprehensive data display
- Full-featured profile edit form with 58+ fields
- Master trainer profile editing interface
- Professional styling and responsive design
- Certificate pages template integration fixes
## Database & Data:
- Custom post type registration with proper capabilities
- Meta field synchronization between users and profiles
- Migration of 53 existing trainers to new system
- Geocoding integration with coordinate storage
## Testing & Deployment:
- Successfully deployed to staging environment
- Executed data migration for all existing users
- Comprehensive E2E testing with 85-90% success rate
- Google Maps API configured and operational
## System Status:
✅ Trainer profile viewing and editing: 100% functional
✅ Data migration: 53 profiles created successfully
✅ Master dashboard integration: Clickable trainer names working
✅ Certificate pages: Template integration resolved
✅ Geocoding: Google Maps API configured and enabled
⚠️ Master trainer profile editing: Minor template issue remaining
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>