WP Manifestindependent plugin directory
manifest / events / anugnya-bookings

Anugnya Bookings

WordPress plugin to do booking with the help of calendly

by Sagacitas Technologies Private Limited · github.com/nisit/anugnya-bookings · website

0stars
0forks

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.zip

Anugnya 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

  1. Create Plugin Folder

    wp-content/plugins/anugnya-bookings/
  2. Upload Files

    • anugnya-bookings.php (main plugin file)
    • includes/admin-page.php
    • includes/export-page.php
  3. Activate Plugin

    • Go to WordPress Admin > Plugins
    • Find "Anugnya Bookings"
    • Click "Activate"

Method 2: Via WordPress Admin

  1. Zip the anugnya-bookings folder
  2. Go to Plugins > Add New > Upload Plugin
  3. Choose your zip file
  4. Click "Install Now"
  5. 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 ID
  • full_name - Customer name
  • email - Customer email
  • phone - Customer phone
  • service - Service type
  • customer_type - Type of customer
  • form_data - JSON with all form fields
  • ip_address - Submitter IP
  • user_agent - Browser info
  • created_at - Submission timestamp
  • status - Booking status
  • notes - Admin notes

Usage

For Site Visitors

Forms automatically connect to the plugin. When users submit:

  1. Data is validated
  2. Saved to database
  3. Admin receives email notification
  4. User receives confirmation email
  5. Success message displayed

For Administrators

View Bookings:

  1. Go to WordPress Admin
  2. Click "Bookings" in sidebar
  3. View all submissions
  4. Click "View" to see details
  5. Update status and add notes

Export Data:

  1. Go to Bookings > Export
  2. Select filters (optional):
    • Status
    • Date range
  3. Click "Export to CSV"
  4. 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:

  1. Settings > General
  2. Update "Email Address"
  3. 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
  • Email
  • 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:

  1. Check the troubleshooting section
  2. Enable WordPress debugging
  3. Check browser console
  4. 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.