Global Settings
Configure global plugin settings that apply across all sites and operations.
Overview
The Settings page provides configuration for:
- Log retention and cleanup
- Debug mode for troubleshooting
- Error notification email
Location: WordPress Admin → GSM Middleware → Settings
Database connection settings are managed on the DB Environments page. Business Central OData credentials, tax configuration, and item status settings are stored in the plugin settings but configured through internal settings management.
Settings Fields
Log Retention (days)
Controls how long log and history records are kept before automatic cleanup.
- Default: 30 days
- Range: 1–365 days
- Applies to: webhook logs, item history, Navision request history
- Error orders are kept for 2× this value (default 60 days)
- Cleanup runs daily at 3 AM via the log cleanup cron
Debug Mode
Enables detailed logging for troubleshooting sync and API issues.
- Default: Disabled
- When enabled, additional diagnostic information is written to logs
- Useful for debugging order sync, inventory sync, and API connection issues
Debug mode can generate large log files. Disable after troubleshooting is complete.
Email Notifications
Email address for error notifications and alerts.
- Default: WordPress admin email
- Receives critical error notifications from sync operations
- Used by the dispute processor for ambiguous card match alerts
Saving Settings
- Adjust settings as needed
- Click Save Settings
- A success notification confirms the save
- Settings take effect immediately
Additional Plugin Settings
The following settings are stored in the gsm_middleware_settings WordPress option but managed through other pages or internal configuration:
Business Central OData Credentials
| Setting | Description |
|---|---|
bc_odata_env | Active environment: live or test |
bc_odata_live_url | Production OData endpoint URL |
bc_odata_live_user | Production OData username |
bc_odata_test_url | Test OData endpoint URL |
bc_odata_test_user | Test OData username |
Passwords are stored encrypted via the Security Manager.
Tax Configuration
| Setting | Default | Description |
|---|---|---|
states_to_tax | AZ, AR, CA, GA, ID, IA, KY, LA, MN, MS, MO, NY, OH, TN, UT, WA, WI | US states requiring sales tax line items |
item_status_not_allowed | Cancelled, Defective, CWO, RTV | Item statuses that block order export |
Crontab Settings
Managed via the Crontab Generator:
| Setting | Default | Description |
|---|---|---|
cron_php_path | (empty) | Path to PHP binary |
cron_order_interval | 60 | Order export interval (minutes) |
cron_inventory_interval | 60 | Inventory import interval (minutes) |
cron_tracking_interval | 1440 | Tracking import interval (minutes) |
cron_tracking_start_hour | 22 | Tracking window start (24-hour) |
cron_tracking_end_hour | 5 | Tracking window end (24-hour) |
Related Documentation
- DB Environments — Database connection management
- API Connections — Business Central API configuration
- Crontab Generator — External cron setup
- Log Cleanup — Automated log cleanup details
- Reports — Email report configuration