Anugnya Bookings
WordPress plugin to do booking with the help of calendly
by Sagacitas Technologies Private Limited · github.com/nisit/anugnya-bookings · website
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/nisit/anugnya-bookings/archive/refs/heads/main.zipAnugnya Bookings Plugin
A WordPress plugin to capture, manage, and export booking form submissions for Anugnya Holistic Care.
Features
✅ Captures Complete Booking Data
- Full name, email, phone
- Service type selected
- Customer type (Treatment, Recovery, Caregiver, Contact)
- All additional form fields stored as JSON
- IP address and user agent tracking
- Timestamp of submission
✅ Admin Dashboard
- View all bookings in sortable table
- Filter by status (Pending, Contacted, Scheduled, Completed, Cancelled)
- Search by name, email, or phone
- Detailed view with all form data
- Update booking status and add notes
- Delete bookings
✅ Export Functionality
- Export to CSV with all data
- Filter exports by status and date range
- UTF-8 encoded for Excel compatibility
- All form fields included as separate columns
✅ Email Notifications
- Admin notification on new booking
- User confirmation email
- Professional HTML email templates
✅ AJAX Form Submission
- No page reload
- Loading states
- Error handling
- User-friendly feedback
Installation
Method 1: Direct Upload
-
Create Plugin Folder
wp-content/plugins/anugnya-bookings/ -
Upload Files
anugnya-bookings.php(main plugin file)includes/admin-page.phpincludes/export-page.php
-
Activate Plugin
- Go to WordPress Admin > Plugins
- Find "Anugnya Bookings"
- Click "Activate"
Method 2: Via WordPress Admin
- Zip the
anugnya-bookingsfolder - Go to Plugins > Add New > Upload Plugin
- Choose your zip file
- Click "Install Now"
- Click "Activate"
File Structure
anugnya-bookings/
├── anugnya-bookings.php # Main plugin file
├── README.md # This file
├── includes/
│ ├── admin-page.php # Admin dashboard
│ └── export-page.php # Export functionality
└── assets/ # (optional) for future CSS/JS
├── css/
└── js/
Database Table
The plugin creates a table: wp_anugnya_bookings
Table Structure:
id- Unique booking IDfull_name- Customer nameemail- Customer emailphone- Customer phoneservice- Service typecustomer_type- Type of customerform_data- JSON with all form fieldsip_address- Submitter IPuser_agent- Browser infocreated_at- Submission timestampstatus- Booking statusnotes- Admin notes
Usage
For Site Visitors
Forms automatically connect to the plugin. When users submit:
- Data is validated
- Saved to database
- Admin receives email notification
- User receives confirmation email
- Success message displayed
For Administrators
View Bookings:
- Go to WordPress Admin
- Click "Bookings" in sidebar
- View all submissions
- Click "View" to see details
- Update status and add notes
Export Data:
- Go to Bookings > Export
- Select filters (optional):
- Status
- Date range
- Click "Export to CSV"
- File downloads automatically
Manage Statuses:
- Pending - New submission
- Contacted - Customer contacted
- Scheduled - Appointment scheduled
- Completed - Service completed
- Cancelled - Booking cancelled
Configuration
Email Settings
Emails are sent to WordPress admin email by default.
To change recipient:
- Settings > General
- Update "Email Address"
- Save Changes
For better delivery, install SMTP plugin:
- WP Mail SMTP (recommended)
- Post SMTP Mailer
Customization
Change Status Options:
Edit includes/admin-page.php, find the status <select> dropdown.
Modify Email Templates:
Edit methods in anugnya-bookings.php:
send_admin_notification()send_user_confirmation()
Add Custom Fields:
All form fields are automatically captured in the form_data JSON field.
Data Captured
Basic Fields (Always Captured):
- Full Name
- Phone Number
- Service Type
- Customer Type
Additional Fields (JSON):
- Treatment type
- Symptoms
- Pause reason and duration
- Preferred services
- Resources needed
- Messages and notes
- Any other form inputs
Security Features
✅ Nonce verification
✅ Data sanitization
✅ SQL injection prevention
✅ XSS protection
✅ CSRF protection
✅ Permission checks
AJAX Endpoints
The plugin registers these AJAX actions:
anugnya_submit_booking- Handle form submissions
JavaScript Integration
The plugin passes data to JavaScript via wp_localize_script:
anugnyaBookings.ajaxUrl // WordPress AJAX URL
anugnyaBookings.nonce // Security nonce
Troubleshooting
Forms Not Submitting
1. Check plugin is activated
- Go to Plugins
- Ensure "Anugnya Bookings" is active
2. Check JavaScript console
- Press F12
- Go to Console tab
- Look for errors
3. Check nonce is available
console.log(anugnyaBookings.nonce);
// Should show a string, not undefined
4. Enable WordPress debugging
In wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
Check /wp-content/debug.log for errors.
Emails Not Sending
1. Test WordPress email Install "Check Email" plugin to test.
2. Install SMTP plugin
- WP Mail SMTP
- Configure with your email provider
3. Check spam folder Admin and user emails might be in spam.
Database Table Not Created
1. Deactivate and reactivate plugin This runs the activation hook again.
2. Check database manually
Look for table: wp_anugnya_bookings
3. Run SQL manually
Copy the CREATE TABLE statement from anugnya-bookings.php and run in phpMyAdmin.
Export Not Working
1. Check file permissions Ensure PHP can write temporary files.
2. Check for output before headers No echo statements before export.
3. Try smaller date range Large exports might timeout.
Frequently Asked Questions
Q: Can I customize the booking statuses?
A: Yes, edit the status dropdown in includes/admin-page.php.
Q: Where is the data stored?
A: In your WordPress database in the wp_anugnya_bookings table.
Q: Can I import bookings?
A: Not currently, but you can insert directly into the database table.
Q: Is data encrypted?
A: Data is stored in standard MySQL format. For encryption, consult a security expert.
Q: Can I restore deleted bookings?
A: No, deletion is permanent. Always export before bulk operations.
Q: How do I backup booking data?
A: Use your regular WordPress backup plugin, or export to CSV regularly.
Q: Can multiple admins access bookings?
A: Yes, any user with "manage_options" capability can view bookings.
Q: Does it work with multisite?
A: Each site in a multisite has its own bookings table.
Changelog
Version 1.0.0
- Initial release
- Booking capture and storage
- Admin dashboard with filters
- CSV export functionality
- Email notifications
- AJAX form submission
Support
For issues or questions:
- Check the troubleshooting section
- Enable WordPress debugging
- Check browser console
- Review PHP error logs
Requirements
- WordPress 5.0 or higher
- PHP 7.0 or higher
- MySQL 5.6 or higher
License
GPL v2 or later
Credits
Developed for Anugnya Holistic Care
By cancer survivors, for cancer survivors
Installation Complete!
Go to WordPress Admin > Bookings to start managing submissions.