Skip to main content

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

info

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
warning

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

  1. Adjust settings as needed
  2. Click Save Settings
  3. A success notification confirms the save
  4. 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

SettingDescription
bc_odata_envActive environment: live or test
bc_odata_live_urlProduction OData endpoint URL
bc_odata_live_userProduction OData username
bc_odata_test_urlTest OData endpoint URL
bc_odata_test_userTest OData username

Passwords are stored encrypted via the Security Manager.

Tax Configuration

SettingDefaultDescription
states_to_taxAZ, AR, CA, GA, ID, IA, KY, LA, MN, MS, MO, NY, OH, TN, UT, WA, WIUS states requiring sales tax line items
item_status_not_allowedCancelled, Defective, CWO, RTVItem statuses that block order export

Crontab Settings

Managed via the Crontab Generator:

SettingDefaultDescription
cron_php_path(empty)Path to PHP binary
cron_order_interval60Order export interval (minutes)
cron_inventory_interval60Inventory import interval (minutes)
cron_tracking_interval1440Tracking import interval (minutes)
cron_tracking_start_hour22Tracking window start (24-hour)
cron_tracking_end_hour5Tracking window end (24-hour)