2 Commits

Author SHA1 Message Date
dwindown
c1db133ffa fix: Remove hardcoded dev mode filters from woonoow.php
🐛 CRITICAL FIX - Root Cause Found!
The plugin had hardcoded dev mode filters that forced EVERYONE into dev mode:
- add_filter('woonoow/admin_is_dev', '__return_true');
- add_filter('woonoow/admin_dev_server', fn() => 'https://woonoow.local:5173');

This caused:
- ✗ SPA trying to load from localhost:5173
- ✗ Loading @react-refresh and main.tsx (dev files)
- ✗ Not loading app.js and app.css (production files)

 Solution:
- Removed hardcoded filters from woonoow.php
- Commented them out with instructions
- Added debug logging to is_dev_mode()
- Updated installation checker to detect this issue

📝 For Developers:
If you need dev mode, add to wp-config.php:
define('WOONOOW_ADMIN_DEV', true);

Or use filter in your development plugin:
add_filter('woonoow/admin_is_dev', '__return_true');

🎯 Result:
- Production mode by default (no config needed)
- Dev mode only when explicitly enabled
- Better UX - plugin works out of the box
2025-11-16 13:02:04 +07:00
dwindown
28593b8a1b feat: Add installation checker script
 Created check-installation.php:
- Comprehensive installation diagnostics
- File structure verification
- PHP configuration check
- WordPress detection
- Constants check (dev mode detection)
- Namespace verification
- Asset URL accessibility test
- Quick actions (clear OPcache, phpinfo)
- Actionable recommendations

🎯 Usage:
1. Upload to: wp-content/plugins/woonoow/check-installation.php
2. Visit: https://yoursite.com/wp-content/plugins/woonoow/check-installation.php
3. Review all checks
4. Follow recommendations

📋 Checks:
- ✓ Required files exist
- ✓ File sizes correct
- ✓ PHP configuration
- ✓ WordPress loaded
- ✓ Plugin active
- ✓ Dev mode disabled
- ✓ Correct namespaces
- ✓ Assets accessible

🚀 Helps diagnose:
- Missing dist files
- Wrong extraction path
- Dev mode issues
- Namespace problems
- File permission issues
- URL accessibility
2025-11-16 12:04:48 +07:00