1. Requirements & Installation
Requirements
- WordPress 5.8 or higher
- PHP 7.4 or higher
- Gym Builder plugin (required)
- GB Stripe Payments plugin (optional for paid bookings)
Installation Steps
- Upload the plugin folder to:
/wp-content/plugins/gb-personal-session/ - Activate Gym Builder plugin first
- Activate GB Personal Session
- Navigate to:
Gym Builder → Personal Sessions
Uninstallation
Deleting the plugin will:
- Remove all plugin database tables
- Delete plugin settings and stored options
- Clear scheduled cron jobs
2. Plugin Setup
After activation, access:
Gym Builder → Personal Sessions
Admin Tabs
- Sessions — Manage session types
- Bookings — View and manage bookings
- Settings — Configure plugin behavior
Initial Setup Checklist
- Configure success & cancel pages
- Set advance booking limit
- Enable/disable email notifications
- Enable guest booking (optional)
- Enable online sessions (optional)
- Save settings
3. Managing Sessions
A session represents a bookable service.
Create a Session
- Go to Sessions
- Click Add Session
- Configure:
- Title
- Trainer
- Class (optional)
- Duration
- Description
- Pricing (free/paid)
- Session mode (offline/online/both)
- Save
Session Modes
- Offline — In-person only
- Online — Virtual only
- Both — User selects during booking
Status
- Active → visible to users
- Inactive → hidden
4. Managing Time Slots
Each session must have available time slots.
Add Slots
- Open session → Manage Slots
- Select date from calendar
- Add time slots
- Save
Bulk Scheduling
- Select weekdays
- Define date range
- Add slots
- Generate automatically
Slot States
- Available
- Booked
- Held (temporary during payment)
5. Booking Flow (Frontend)
Booking is handled via a 5-step wizard.
Steps
- Select Trainer & Session
- Choose Date & Time
- Enter User Info
- Review Booking
- Confirm
Booking Types
Free Session
- Instantly confirmed
Paid Session
- Slot held for 10 minutes
- Redirect to Stripe Checkout
6. Managing Bookings (Admin)
Booking Status
- Pending
- Confirmed
- Completed
- Canceled
- No Show
Admin Actions
- Update status
- Send reminders
- Process refunds
- View payment logs
- Create manual bookings
7. Email Notifications
Email Events
- Booking confirmation
- Cancellation
- Completion
- Reminder (24h before)
Features
- HTML email templates
- Automatic reminders via cron
- Manual reminder option
8. Stripe Payments
Workflow
- Customer selects paid session
- Slot held (10 min)
- Stripe Checkout starts
- Webhook confirms payment
- Booking becomes permanent
Refunds
- Configurable percentage
- Processed via Stripe
- Logged for tracking
9. Online Sessions
Features
- Enable virtual training
- Google Meet integration
- Online/offline toggle per session
10. Google Calendar Sync (Full Setup)
Google Calendar integration allows automatic event creation, attendee invitations, and optional Google Meet links.
Step 1: Create Google Cloud Project
- Visit: https://console.cloud.google.com/
- Create a new project
- Select the project
Step 2: Enable APIs
Enable:
- Google Calendar API
- Google People API
Step 3: Configure OAuth Consent
- Choose External
- Add app name and email
- Add scopes:
https://www.googleapis.com/auth/calendar.events
https://www.googleapis.com/auth/userinfo.email
- Add your email as test user
Step 4: Create Credentials
- Go to Credentials
- Create OAuth Client ID
- Select Web Application
Add Redirect URI:
https://yourdomain.com/wp-admin/admin.php?page=gb-personal-sessions&gbps_gcal_auth=1
Step 5: Add Credentials to Plugin
- Go to plugin settings
- Paste Client ID & Secret
- Save
Step 6: Connect Google Account
- Click Connect Google Account
- Login & allow permissions
- Confirm connection success
Step 7: Enable Sync
- Enable Google Calendar Sync
- Optional: Enable Google Meet
- Save
Step 8: Test Integration
- Book a session
- Check calendar event created
- Cancel booking → event removed
Notes
- Only confirmed bookings create events
- Sync failures do not break booking
- Tokens auto-refresh
11. Trainer Reviews
Workflow
- Booking completed
- User receives review request
- User submits rating
Options
- Auto-approve or admin approval
- Star rating system
- Average rating display
12. Dashboard Tabs
Student Dashboard
- View bookings
- Cancel bookings
- Leave reviews
Trainer Dashboard
- View sessions
- Mark session complete
13. Shortcodes
[gb_personal_session]
[gb_personal_session trainer_id="123"]
[gb_personal_session class_id="456"]
14. Settings Reference
Stored in:
gb_personal_session_settings
15. Hooks & Filters
Actions
gbps/booking_confirmedgbps/booking_completedgbps/booking_canceled
Filters
gbps/refund_percentage
16. Troubleshooting
Common Issues
Stripe not working
- Check API keys and webhook
Emails not sending
- Configure SMTP
Slots not showing
- Ensure session is active
Google Calendar not syncing
- Verify OAuth connection
- Enable sync
Database Structure
Tables
gbps_sessionsgbps_available_slotsgbps_bookingsgbps_payment_logsgbps_reviews
Cron Jobs
gbps_daily_cron→ Reminder emailsgbps_release_expired_holds→ Release held slots