Onlinefotka Parcel Shipping with GLS for WooCommerce

Descripció

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 order
  • wp 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 order
  • wp 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

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.

Instal·lació

  1. Install the plugin via Plugins Add New Upload Plugin, or upload the folder to /wp-content/plugins/ manually.
  2. Activate the plugin.
  3. Go to WooCommerce GLS Shipping and open the API & Account tab.
  4. 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.
  5. Go to WooCommerce Settings Shipping, create a shipping zone, and add the GLS shipping method(s) you want to offer.
  6. 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.
  7. 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.
  8. (Optional) 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.
  9. (Optional) 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). 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). The two crons run independently on their own schedules.
  10. (Optional) In the Automation tab, enable Send delivery email to notify customers automatically when GLS confirms delivery.
  11. (Optional) 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.
  12. (Optional) Create a new WordPress page, add the shortcode [gls_tracking], and publish it. Customers can enter their order number and order key to look up their parcel status.
  13. (Optional) In the Other tab, enable Estimated Delivery at Checkout to display business-day delivery ranges below the GLS shipping rate at checkout.
  14. (Optional) In the Other tab, enable Label File Cleanup and set the number of days after which PDF files are deleted (default: 90 days).

PMF

Which GLS countries are supported?

The plugin supports GLS subsidiaries in Slovakia (SK), Czech Republic (CZ), Hungary (HU), Romania (RO), Serbia (RS), Croatia (HR), and Slovenia (SI) — wherever GLS offers MyGLS REST API v2 access. Label generation, tracking, and Parcel Shop/Locker selection all depend on API access from your GLS subsidiary.

Is this compatible with HPOS?

Yes. The plugin is fully compatible with WooCommerce High Performance Order Storage (HPOS / custom_order_tables). The tracking status filter, order meta box, and all queries work correctly in both classic and HPOS mode.

Is this compatible with the WooCommerce Checkout Block?

Yes. The Parcel Shop and Parcel Locker location picker works in both classic and block-based checkout. The plugin uses the ExperimentalOrderShippingPackages slot to inject the pickup selector directly below the shipping rates in the checkout block.

How do I get GLS API credentials?

Contact your local GLS subsidiary and request MyGLS REST API v2 access. You will receive a client number, username, and password. Use the Sandbox mode first to test without affecting live shipments.

Can customers choose a Parcel Shop at checkout?

Yes. When the GLS Parcel Shop shipping method is enabled and added to a shipping zone, a location picker appears at checkout. Customers select their preferred pickup point from an interactive GLS map.

How do return labels work?

Open any order with an existing GLS label in the admin. Click Generate Return Label in the GLS meta box. The plugin calls the GLS API with the customer’s address as the pickup point and your store address as the delivery address, downloads the PDF label, and emails it to the customer automatically. You can customize the return label email in WooCommerce Settings Emails GLS Return Label.

How do I resend the tracking email?

Open the order in admin. In the GLS meta box, click Resend Tracking Email. The standard WooCommerce processing order email (which includes GLS tracking numbers) is resent to the customer’s billing email.

How does the estimated delivery date work?

When enabled in the Other settings tab, a line like «Estimated delivery: 1–2 business days» appears below the GLS shipping method at checkout. The range is based on a static map: SK/CZ = 1–2 days, HU/HR/SI = 2–3 days, RO/RS = 3–5 days, DE/PL/AT = 2–3 days, all other countries = 3–7 days. It is a general guideline — not a GLS guarantee.

Does the tracking shortcode require login?

No. Customers enter their order number and order key (from the confirmation email). The order key ensures only the rightful customer can view their order’s tracking status.

How do I filter orders by GLS delivery status?

In WooCommerce Orders, use the GLS status filter dropdown (next to the existing status filter). Options: All GLS Statuses, In Transit, Delivered, Problem, No GLS Label. Works in both classic CPT and HPOS order screens.

Are labels stored securely?

Yes. PDF label files are stored in the WordPress uploads directory under a protected subfolder with an .htaccess that blocks direct access. Labels are served only through an authenticated, nonce-protected download URL. The optional cleanup job removes old files automatically.

Can I use WP-CLI to generate labels?

Yes. Use wp gls generate --order=<id> to generate a label, wp gls sync to sync tracking for all active orders, wp gls status --order=<id> to view tracking history, and wp gls cleanup [--days=<n>] to manually run the label file cleanup.

Ressenyes

No hi ha ressenyes per a aquesta extensió.

Col·laboradors i desenvolupadors

«Onlinefotka Parcel Shipping with GLS for WooCommerce» és programari de codi obert. La següent gent ha col·laborat en aquesta extensió.

Col·laboradors

“Onlinefotka Parcel Shipping with GLS for WooCommerce” s’ha traduït a 1 configuració regional. Gràcies als traductors per les seves aportacions.

Traduïu «Onlinefotka Parcel Shipping with GLS for WooCommerce» a la vostra llengua.

Interessats en el desenvolupament?

Navegueu pel codi, baixeu-vos el repositori SVN, o subscriviu-vos al registre de desenvolupament per fisl de subscripció RSS.

Registre de canvis

1.1.2

  • Fixed translations in Automation tab — section descriptions for «Live Tracking Sync» and «Auto WC Status Change» were showing in English due to a double-UTF-8 encoded em-dash in the msgid strings; fixed in all 5 language files (sk_SK, cs_CZ, de_DE, hu_HU, pl_PL)
  • Added missing translations for «Customer Delivery Email» section title and its description in all 5 languages
  • Estimated delivery times at checkout are now configurable per destination country group (SK/CZ, HU/HR/SI, RO/RS, DE/PL/AT, other) in WooCommerce GLS Shipping Other; previously they were hardcoded
  • Fixed WP.org Installation tab not appearing — removed sub-headings (=== ===) from the Installation section in readme.txt

1.1.1

  • Fixed GLS status code map — all 90 codes from official MyGLS API documentation (Appendix G, ver. 25.12.11) are now accurate; codes 13 (sorting error) and 20 (wrong address) were previously mislabeled as «Delivered» and are now correctly treated as problem codes
  • Fixed status badge color in the admin orders list — badge now uses the explicit delivery code set [5, 54, 55, 58, 92, 93] and problem code set instead of a numeric range, so all GLS SK / international codes display the correct color
  • Fixed «Status» button in order admin — now uses the code-based label from the internal map instead of the raw GLS StatusText (which contains internal operational data such as parcel refs and time windows)
  • Fixed «Refresh Tracking» table — Status column now shows human-readable labels from the internal code map; events are sorted newest-first
  • Fixed GLS API language code — LanguageIsoCode is now always sent lowercase (e.g. «sk» instead of «SK») to prevent empty StatusText responses
  • Split automation into two independent WP-Cron jobs: Live Tracking Sync fetches GLS API and saves status to order meta / badge / notes; Auto WC Status Change reads saved meta and applies mapping rules — no API calls in the second cron
  • Added configurable interval for each cron independently: every 30 min, 1 h, 2 h, 4 h, twice daily, or daily (three new custom intervals: ofgls_30min, ofgls_2hours, ofgls_4hours)
  • Fixed default status mapping rule — was incorrectly pre-filled as «code 20 Completed»; now defaults to «code 5 Completed»
  • Fixed settings helper text — was showing «20 = Delivered»; now shows accurate examples including code 5 = Delivered

1.1.0

  • Label file cleanup — new daily WP-Cron job that automatically deletes GLS label PDFs older than a configurable number of days (default 90); toggle and day count in Other settings tab
  • Resend tracking email — new «Resend Tracking Email» button in the order meta box; resends the processing email with tracking number to the customer
  • Return label — new «Generate Return Label» button in the order meta box; generates a GLS return label (customer store) via the API and emails it to the customer as a PDF attachment
  • Tracking status filter in admin orders list — new filter dropdown (In Transit / Delivered / Problem / No GLS Label) for both classic CPT and HPOS order screens
  • Estimated delivery date at checkout — optional feature (toggle in Other settings); displays business-day ranges per destination country below the GLS shipping rate at checkout
  • WP-CLI support — new wp gls generate, wp gls sync, wp gls status, and wp gls cleanup commands for label generation, tracking sync, status inspection, and manual cleanup
  • New WooCommerce email class OFGLS_Email_Return_Label — sends return label PDF as an attachment; configurable in WooCommerce Settings Emails
  • Admin dashboard widget — monthly GLS stats: labels generated, delivered, in transit, and problem parcels; cached for one hour

1.0.8

  • Tracking history panel in order admin — the «Refresh Tracking» button now shows the full event history (date, city, status) for all parcels, not just the latest event
  • GLS status badge in admin orders list — latest GLS status shown as a colored badge next to the tracking number (green = delivered, blue = in transit, red = problem)
  • Customer delivery email — optional WooCommerce email sent to the customer when GLS tracking confirms delivery (status codes 5, 54, 55, 58, 92); enabled in Automation settings; customizable in WooCommerce Settings Emails
  • Bulk action «Refresh GLS Tracking» — refresh tracking for multiple orders at once from the orders list
  • Fixed auto-label generation when order status changes via REST API or frontend checkout (not only admin) — the automation class is now loaded on demand in those contexts

1.0.7

  • GLS tracking numbers now visible to customers in My Account — shown as clickable links in the orders list and on the order detail page
  • Added «Refresh Tracking» button in the order admin panel — manually fetch the latest GLS parcel status without waiting for the next WP-Cron run
  • Fixed order admin panel label generation, delete, and status buttons — they were silently non-functional due to a JavaScript variable name mismatch introduced in 1.0.6
  • Fixed WP-Cron tracking sync for multi-parcel orders — previously only the first parcel number was synced; now all parcel numbers are synced and each gets its own note
  • Shortcode [gls_tracking] now works alongside [ofgls_tracking] — both are registered; readme and settings page already referenced the shorter form
  • Added missing translation string «Invalid request.» for bulk label download validation

1.0.6

  • Fixed «Extended services» toggle in the order meta box — clicking the link no longer scrolls the page to the top
  • Fixed WP-Cron tracking sync — the automation class is now correctly loaded during cron execution (was only loaded in admin context, so the scheduled hook never fired)
  • GLS Delivery Point Map widget now loads the correct country-specific URL based on the GLS country configured in settings (SK, CZ, HU, HR, SI, RO, RS each have their own map domain)

1.0.5

  • Fixed bulk label download failing on servers with object cache (Redis/Memcached) — transient key is now always stored in lowercase to match sanitize_key() used during retrieval

1.0.4

  • Removed bundled translation files — translations are now managed through translate.wordpress.org

1.0.3

  • GLS map widget is now loaded on demand — only when the customer selects a GLS Parcel Shop or Parcel Locker shipping method, not for every checkout visitor

1.0.2

  • Added WooCommerce Checkout Blocks compatibility — GLS Parcel Shop and Parcel Locker location picker now works in the block-based checkout
  • Declared cart_checkout_blocks feature compatibility

1.0.1

  • Updated text domain to match plugin slug (onlinefotka-parcel-shipping-gls)
  • Renamed internal prefixes from OGS_ to OFGLS_ for WP.org compliance
  • Improved transient key validation in bulk label download

1.0.0

  • Initial release