Onlinefotka Parcel Shipping with GLS for WooCommerce
Onlinefotka Parcel Shipping with GLS is a full-featured GLS carrier integration for WooCommerce. Connect your GLS account, generate shipping labels directly from the order screen, send return labels to customers, and give customers the option to pick up their parcels at a GLS Parcel Shop or Parcel Locker.
Built with full HPOS (High Performance Order Storage) and WooCommerce Checkout Blocks compatibility, plus a clean modern settings interface.
Shipping Methods
- GLS Standard — home delivery, weight-based pricing, free shipping threshold
- GLS Parcel Shop — customer selects a pickup point from an interactive map at checkout
- GLS Parcel Locker — customer selects a 24/7 automated locker at checkout
- Per-method: enable/disable, custom title, default price, weight-based rates, free shipping above, supported countries
- Estimated delivery time — optional display of business-day ranges per destination country shown at checkout below the shipping rate (SK/CZ 1–2 days, HU/HR/SI 2–3 days, etc.)
Label Management
- Generate GLS shipping labels directly from the WooCommerce order screen
- Return labels — generate a GLS return label (customer → store) with one click; the label PDF is automatically emailed to the customer
- Print individual or bulk labels (PDF)
- A4 and thermal printer support with configurable print position
- Customizable client reference and parcel content fields
- Delete labels (also cancels the parcel in GLS system when possible)
- Automatic label file cleanup — daily WP-Cron job deletes PDF files older than a configurable number of days (default 90) to free up server space
Advanced GLS Services
- Contact Service (CS1) — sends customer phone number to the courier
- Flexible Delivery Email (FDS) — customer can reschedule via email link
- Flexible Delivery SMS (FSS) — reschedule via SMS
- SMS Service (SM1) — tracking number sent by SMS with custom text
- SMS Pre-advice (SM2) — pre-delivery SMS notification
- Addressee Only (AOS) — parcel delivered only to the named recipient
- Insurance (INS) — insures parcel for the full order value
- 24H Guaranteed / Express — expedited delivery options
Automation
- Auto-generate GLS label when order moves to selected WooCommerce status
- Live Tracking Sync via WP-Cron — periodically fetches GLS parcel status from the API and saves it to each order (status badge, order notes, customer delivery email); runs only for orders with an existing GLS label; configurable interval (every 30 min, 1 h, 2 h, 4 h, twice daily, or daily)
- Auto WC Status Change — a separate, independent WP-Cron job that reads the last saved GLS status and automatically changes the WooCommerce order status according to configurable mapping rules (by GLS code or keyword); runs on its own schedule without making any GLS API calls
- Status mapping rules — define which GLS status code or text keyword triggers a WooCommerce order status change (e.g. GLS code 5 → Completed); rules are applied by the Auto WC Status Change cron
- Complete GLS status code map — all 90 status codes from the official MyGLS API documentation (Appendix G, ver. 25.12.11) with accurate labels for all supported countries (SK, CZ, HU, HR, RO, SI, PL, DE)
Tracking
- Tracking numbers injected automatically into all WooCommerce order emails
- Resend tracking email — button in the order admin panel to resend the tracking email to the customer at any time
- Self-service tracking page via
[gls_tracking]shortcode — customers look up their parcel using order number + billing email - GLS tracking status visible in My Account → Orders — tracking numbers shown in the orders list and on the order detail page
- Manual Refresh Tracking button in the order admin panel — shows the full event history (date, city, status) for all parcels
- Tracking status filter in the admin orders list — filter orders by GLS status: In Transit, Delivered, Problem, or No GLS Label
- Customer delivery email — optional WooCommerce email sent when GLS tracking confirms delivery; customizable in WooCommerce → Settings → Emails
- GLS status badge in admin orders list — latest status displayed as a colored badge (green = delivered, blue = in transit, red = problem)
- Bulk action Refresh GLS Tracking — sync tracking for multiple orders at once from the orders list
Emails
Two additional WooCommerce emails are registered by the plugin (configurable in WooCommerce → Settings → Emails):
- GLS Delivered — sent to the customer when GLS tracking confirms delivery (status codes 5, 54, 55, 58, 92, 93)
- GLS Return Label — sent to the customer when a return label is generated; the PDF is attached automatically
Admin Dashboard Widget
A dashboard widget on the WordPress admin home screen shows monthly GLS shipping statistics at a glance:
- Total labels generated this month
- Delivered parcels
- In-transit parcels
- Problem parcels (delivery failed, returned, etc.)
WP-CLI Support
Manage GLS labels and tracking directly from the command line:
wp gls generate --order=<id>— generate a label for an orderwp gls sync [--order=<id>]— sync GLS tracking status (all active orders or a specific one)wp gls status --order=<id>— display full tracking event history for an orderwp gls cleanup [--days=<n>]— manually delete old label PDF files
Requirements
- WordPress 6.0 or higher
- WooCommerce 7.0 or higher
- PHP 7.4 or higher
- Active GLS account with MyGLS REST API access
Basic setup
- Install the plugin via Plugins → Add New → Upload Plugin, or upload the folder to
/wp-content/plugins/manually. - Activate the plugin.
- Go to WooCommerce → GLS Shipping and open the API & Account tab.
- Enter your GLS Client Number, API Username, and API Password. Select your GLS Country (SK, CZ, HU, etc.) and switch Mode to Production when ready to ship. Click Save Settings, then Test API Connection to verify.
- Go to WooCommerce → Settings → Shipping, create a shipping zone, and add the GLS shipping method(s) you want to offer.
Sender address
- In WooCommerce → GLS Shipping → Sender Address, fill in your company name, street, house number, city, postcode, country, and phone. This address is printed on every GLS label as the pickup address.
Label settings
- In the Label tab, choose your printer type (A4 or thermal) and default print position. Optionally customize the client reference format and parcel content text.
Optional: Parcel Shop / Parcel Locker at checkout
- Add the GLS Parcel Shop and/or GLS Parcel Locker shipping methods to your shipping zone. Customers will see an interactive map at checkout to select their preferred pickup point. Works with both classic and block-based checkout.
Optional: Automation
- In the Automation tab, enable Auto-generate GLS Label and select the order status(es) that should trigger label creation (e.g. Processing). Enable Live Tracking Sync to have WP-Cron periodically fetch GLS parcel status from the API and save it to each order — choose an interval (every 30 min, 1 h, 2 h, 4 h, twice daily, or daily). This cron only contacts the GLS API; it does not change the WooCommerce order status. Enable Auto WC Status Change to automatically update the WooCommerce order status based on the last saved GLS status — configure its own interval and define mapping rules (e.g. GLS code 5 → Completed). This cron reads the already-saved GLS data without making any API calls. The two crons run independently on their own schedules.
Optional: Customer emails
- In the Automation tab, enable Send delivery email to notify customers automatically when GLS confirms delivery.
- To send return labels: click Generate Return Label in any order’s GLS meta box. The PDF is generated via GLS API and emailed to the customer automatically. Customize the email in WooCommerce → Settings → Emails → GLS Return Label.
Optional: Tracking page
- Create a new WordPress page, add the shortcode
[gls_tracking], and publish it. Customers can enter their order number and order key (from the confirmation email) to look up their parcel status.
Optional: Estimated delivery at checkout
- In the Other tab, enable Estimated Delivery at Checkout. A „Estimated delivery: X–Y business days“ line will appear below the GLS shipping rate at checkout, based on the customer’s destination country.
Optional: Label file cleanup
- In the Other tab, enable Label File Cleanup and set the number of days after which PDF files are deleted (default: 90 days). A daily WP-Cron job handles the cleanup automatically.
External services
This plugin connects to two external services provided by GLS:
1. MyGLS REST API (api.mygls.*)
Used for generating shipping labels, retrieving delivery-point (Parcel Shop / Parcel Locker) data, and tracking parcel status. The plugin sends data to this service when:
- You generate a GLS label from an order — sends sender address, recipient address, parcel weight, and selected GLS services to the API.
- You request the list of Parcel Shop or Parcel Locker locations — sends the country code and optional search coordinates.
- The automatic tracking sync (WP-Cron) fetches parcel status — sends parcel numbers.
The exact API endpoint depends on the GLS subsidiary country configured in the plugin settings (e.g. api.mygls.sk, api.mygls.cz, api.mygls.hu).
- GLS Group website: https://gls-group.eu/
- MyGLS portal: https://mygls.sk/ (country-specific variants available)
- GLS Privacy Notice: https://gls-group.com/GROUP/en/data-protection/
- GLS Terms of Use: https://mygls.sk/podmienky-pouzivania/ (varies by country subsidiary)
2. GLS Delivery Point Map widget (map.gls-{country}.com)
When the GLS Parcel Shop or Parcel Locker shipping method is active, the plugin loads a JavaScript widget from the GLS country-specific domain (e.g. map.gls-slovakia.com, map.gls-czech.com, map.gls-hungary.com, etc.) at checkout to display an interactive map for selecting a pickup point. The exact domain is determined by the GLS country configured in the plugin settings. This widget is provided by GLS and may set its own cookies or collect usage data per GLS’s privacy policy linked above.
