Changelog
All notable changes to GSM Middleware are documented here.
[1.18.46] - June 1, 2026
Fixed
BazaarVoice Schema Markup Invalid JSON
Fixed "bad escape sequence" errors in review JSON-LD that were preventing successful metafield sync to BigCommerce and causing invalid schema.org markup.
Problem:
Product names and review content containing:
- HTML entities (
",&, etc.) - Newline characters (
\n,\r) - Backslash escapes (
\,)
Were being inserted directly into JSON-LD without sanitization, resulting in:
{
"@id": "https://www.baits.com/rumble-shad/#variant-NL-RSD5-BBT",
"name": "Rumble Shad
- Rumble Shad 5 - 2 1/4"\, 3/8 Oz. - Bubblegum Tiger",
"sku": "NL-RSD5-BBT"
}
This caused:
- BigCommerce metafield API errors
- Invalid JSON-LD structure
- Google Search Console schema validation failures
- Failed review sync operations
Solution:
Added sanitize_text_content() method in BV_Metafield_Sync that:
- Decodes HTML entities:
"→",&→& - Removes newlines/tabs: Replaces with single spaces
- Strips backslashes:
\,→, - Collapses whitespace: Multiple spaces → single space
- Trims: Removes leading/trailing whitespace
Applied to all text fields in JSON-LD:
- Product names
- Review titles
- Review bodies
- Author names
Result:
{
"@id": "https://www.baits.com/rumble-shad/#variant-NL-RSD5-BBT",
"name": "Rumble Shad - Rumble Shad 5 - 2 1/4\", 3/8 Oz. - Bubblegum Tiger",
"sku": "NL-RSD5-BBT"
}
Clean, valid JSON-LD that passes all validation checks.
Impact:
- BazaarVoice metafield sync operations now complete successfully
- Schema.org markup validates correctly in Google Search Console
- Improved SEO through proper rich snippet display
[1.18.45] - May 27, 2026
Added
Global User-Agent Header for All HTTP Requests
All HTTP requests made by GSM Middleware now include a standardized User-Agent header that identifies the plugin and its version.
Format: GSM Middleware/{version}
Example: GSM Middleware/1.18.45
Benefits:
- Better Request Tracking - External services (BigCommerce, WooCommerce, Business Central, Signifyd, NMI, BazaarVoice) can identify requests originating from GSM Middleware
- Improved Debugging - API provider logs will clearly show GSM Middleware requests, making it easier to diagnose rate limiting, connection issues, or API changes
- Analytics & Monitoring - API providers can track GSM Middleware usage patterns and provide better support
- Version Identification - Support teams can quickly identify which version of the plugin is making requests
Implementation Details:
- Global helper function
gsm_middleware_user_agent()provides centralized version string - Applied to all HTTP request methods:
wp_remote_get()wp_remote_post()wp_remote_request()curl_init()withCURLOPT_USERAGENT
Updated Components:
- API Clients: BigCommerce_Client, WooCommerce_Client, BV_Discovery_Client, BC_OData_Client, NTLM_SOAP_Client, NTLM_Stream
- Sync Managers: WooCommerce_Order_Sync, Tracking_Sync, BV_SFTP_Feed_Sync, BV_Discovery_Sync
- External Services: Dispute_Processor (NMI, Signifyd), Lookups_API, Connection_Tester, API_Connection_Repository
Example Requests:
# BigCommerce API request
GET https://api.bigcommerce.com/stores/{hash}/v3/catalog/products
User-Agent: GSM Middleware/1.18.45
X-Auth-Token: {token}
# WooCommerce API request
GET https://example.com/wp-json/wc/v3/orders
User-Agent: GSM Middleware/1.18.45
Authorization: Basic {credentials}
# Business Central OData request
GET https://bc-server/OData/Company/ProductInventory
User-Agent: GSM Middleware/1.18.45
Troubleshooting with User-Agent:
When working with API providers' support teams, they can now filter their logs by User-Agent to:
- Identify all requests from your middleware instance
- Diagnose rate limiting or quota issues
- Track API usage patterns
- Investigate connection or authentication problems
See Also:
[1.18.44] - May 27, 2026
Added
Comprehensive Unit Tests for High-Priority Classes
Added 5 new test files with 41 test methods covering critical business logic components:
- Abstract_Order_Sync_Test.php (5 tests) - State normalization, maintenance window handling, dry-run mode, logger injection
- Order_Generator_API_Test.php (9 tests) - Permissions, state options, parameter validation, CSV/manual address modes, tax handling
- Dispute_Processor_Test.php (8 tests) - Test mode, repository injection, payload validation, queue job processing, logging
- Site_Repository_Test.php (9 tests) - Connection management, lazy loading, status reporting, encrypted fields, constants
- Queue_Worker_Test.php (10 tests) - Handler registration, lock acquisition, job processing, error handling, limit enforcement
Test Coverage Summary Document - Created TEST_COVERAGE_SUMMARY.md documenting:
- Coverage statistics: 37.4% (40/107 classes)
- Remaining gaps and testing roadmap for v1.18.45+
- Prioritized class list for future test expansion
Changed
- Test Coverage - Increased from 32.7% (35/107 classes) to 37.4% (40/107 classes)
- Test Count - 396 tests with 827+ assertions across 37 test files
[1.18.43] - May 20, 2026
Fixed
- BV Metafield Sync - Review Schema Shape - Changed BigCommerce metafield JSON-LD output from two separate
Productobjects to a single object containing bothreviewandaggregateRating. Fixes Google/Search Console validation errors. - Schema Markup REST Output - Changed
/items/{id}/schema-markupHTML output to merge stored review and aggregate fragments into oneProductJSON-LD script. - Migrations 020/021 - Class-Based Format - Converted migrations to closure-based format for proper execution by Activator.
Previous Versions
For complete version history, see the CHANGELOG.md file in the plugin repository.