Order Management

After a customer completes checkout with a Slovenská Pošta shipping method, the selected pickup point data is stored permanently on the WooCommerce order as order meta. This data is then displayed in multiple locations for both the store owner and the customer.
What Data Is Stored
The following fields are stored as WooCommerce order meta:
| Meta Key | Description |
|---|---|
_wcsp_pickup_point_id | Internal database ID of the pickup point |
_wcsp_pickup_point_ref_id | Slovenská Pošta reference ID (from the XML feed) |
_wcsp_pickup_point_name | Display name of the pickup point |
_wcsp_pickup_point_street | Street name |
_wcsp_pickup_point_number | Street number / house number |
_wcsp_pickup_point_city | City |
_wcsp_pickup_point_zip | Postal code |
_wcsp_pickup_point_country | Country code (e.g. SK) |
These values are written to the order when it is created during checkout. They are permanent and not affected by later changes to the pickup point database.
ePodací Hárok Meta Keys
The following fields are stored when an ePH shipment is created for an order:
| Meta Key | Description |
|---|---|
_wcsp_eph_sheet_id | ePH sheet ID returned by the API |
_wcsp_eph_parcel_id | Parcel ID within the sheet |
_wcsp_eph_parcel_number | Parcel barcode assigned by Slovenská Pošta |
_wcsp_eph_label_url | Local URL to the downloaded label PDF |
_wcsp_eph_registered | '1' once the sheet has been successfully registered |
_wcsp_eph_weight | Submitted weight in kg |
_wcsp_eph_parcel_category | Submitted parcel category code |
_wcsp_eph_parcel_class | Submitted parcel class code |
_wcsp_eph_services | Array of submitted service codes |
_wcsp_eph_cod_amount | COD amount in EUR (decimal) |
_wcsp_eph_insurance_amount | Insurance amount in EUR (decimal) |
_wcsp_eph_note | Note submitted with the shipment |
_wcsp_eph_payment_type | Submitted payment type code |
Tracking Meta Keys
The following fields are stored when a tracking number is added to an order:
| Meta Key | Description |
|---|---|
_wcsp_tracking_number | Barcode / tracking number (set manually by the admin) |
_wcsp_tracking_events | Cached events array from the Slovenská Pošta API (serialized, newest first) |
_wcsp_tracking_synced_at | Unix timestamp of the last successful API sync |
_wcsp_tracking_final | When '1', the order has reached a final status and background sync has stopped |
Where Pickup Point Information Is Displayed
| Location | Controlled By |
|---|---|
| WP-Admin Order Edit | Always shown when pickup point data is present |
| Order Confirmation Email | display_in_email setting |
| Thank You Page | display_in_thank_you setting |
| My Account — View Order | display_in_view_order setting |
Each display context can be independently enabled or disabled in WP-Admin > Slovenská Pošta > Pickup Points.
Address Override
If Replace Shipping Address is enabled in settings, the order’s WooCommerce shipping address fields are overwritten with the pickup point’s address at the time the order is created:
- Shipping company → pickup point name
- Shipping address 1 →
{street} {number} - Shipping city → city
- Shipping postcode → postal code
- Shipping country → country code
This makes the pickup point address visible to any system that reads the standard WooCommerce shipping address (order exports, shipping label plugins, etc.).
The original pickup point data is always available via the _wcsp_pickup_point_* meta keys regardless of the address override setting.
Admin Order View
Pickup Point in WP-Admin
When an order contains a Slovenská Pošta pickup point selection, a dedicated section is displayed in the WP-Admin order edit page.
Location: The pickup point information appears below the shipping address in the Order Details meta box, on the right side of the order edit screen.
What Is Displayed
The admin order view shows:
- Pickup Point Name — the full name of the selected location (e.g., "Pošta Bratislava 1").
- Address — street, street number, postal code, and city.
- Opening Hours — a formatted table of the pickup point’s opening hours, organized by day of the week.
The layout uses a two-column flexbox design:
- Left column: name and address
- Right column: opening hours table
Editing the Pickup Point
The admin view is display-only. There is no built-in UI to change the pickup point on an existing order from the admin panel. If you need to update the pickup point, you can edit the order meta fields directly using a meta box plugin (such as Advanced Custom Fields, or the built-in Custom Fields meta box in WordPress).
The relevant meta keys to update are listed in the Order Management Overview.
Tracking Metabox
When the tracking feature is enabled, a Slovenská Pošta – Tracking sidebar metabox is added to the order edit page.
Entering a Tracking Number
Type or paste the parcel barcode into the Tracking Number field and save. Saving the number:
- Stores it as
_wcsp_tracking_numberon the order. - Resets any previously cached events if the number changed.
- Adds an order note: "Tracking number set: [number]".
Refreshing Tracking Events
Click Refresh to immediately fetch the latest events from the Slovenská Pošta API, regardless of the background sync interval or night-hours guard. The metabox updates in place via AJAX and shows the last-updated time.
Event List
The metabox displays cached tracking events with:
- Date and time
- Status category label (e.g., "In Transit", "Available for Pickup")
- Description from the API
- Location / depot name (when available)
A Track on Slovenská Pošta → link is shown at the bottom of the metabox.
Order List Column
When Show Admin Order List Column is enabled in Tracking Settings, a Tracking column appears after the Order Total column in the orders list. Each entry shows:
- The tracking number as a color-coded badge (color reflects the latest tracking category).
- A detail icon that opens a modal with the full event timeline for that order.
ePodací Hárok Metabox
When the ePodací Hárok feature is configured, a Slovenská Pošta – ePodací Hárok sidebar metabox is added to the order edit page. It allows you to create shipments and download labels without leaving the order screen. Full details are in Single Order.
Before Creating a Shipment
The metabox shows an edit form with fields for weight, parcel category, parcel class, payment type, additional services, COD amount, insurance amount, and a note. Several fields are pre-filled automatically based on order data (COD detection, non-stackable packaging, pickup-point service flag).
After Registration
Once the shipment is created and registered with Slovenská Pošta, the form is replaced by a read-only summary showing the parcel number, submitted details, a Download Label button, and a Regenerate ePH button.
Order List Column
The orders list shows a compact ePH summary badge for each order that has ePH data: parcel category, weight, COD/insurance amounts (if applicable), a quick-edit link, and a label download link.
Action Hooks
You can add custom content before or after the admin pickup point display using action hooks:
// Before the pickup point display
add_action( 'wcsp_before_pickup_point_admin_display', function( $order ) {
// $order = WC_Order object
} );
// After the pickup point display
add_action( 'wcsp_after_pickup_point_admin_display', function( $order ) {
// $order = WC_Order object
} );
See Hooks & Filters for the full reference.
Order Emails
Pickup Point in Order Emails
When Show in Order Emails is enabled in Pickup Points Settings, pickup point details are automatically appended to WooCommerce order emails.
The pickup point section is added to emails via the woocommerce_email_after_order_table hook. It appears after the order table in the email body.
Email Format
The email display uses an HTML two-column table layout:
- Left column: Pickup point name and full address.
- Right column: Opening hours table (days of the week and hours).
The email also supports plain text format for email clients that do not render HTML. In plain text mode, the name, address, and opening hours are displayed as simple text.
Which Emails Include Pickup Point Data
WooCommerce sends order emails on various triggers. Pickup point data is appended to all emails that use the woocommerce_email_after_order_table hook, which typically includes:
- New Order (sent to the store admin)
- Customer Order Confirmation (sent to the customer on checkout)
- Customer Invoice / Order Details (sent on request)
- Order Processing notification
Disabling the Email Display
To remove pickup point information from emails without disabling the feature entirely, set Show in Order Emails to No in WP-Admin > Slovenská Pošta > Pickup Points.
Tracking in Emails
When a tracking number has been set on an order and Show in Order Emails is enabled in Tracking Settings, a tracking section is injected into customer-facing transactional emails.
Which Emails Include Tracking
By default, tracking is included in:
- Customer Processing Order — sent when the order status changes to "Processing"
- Customer Completed Order — sent when the order status changes to "Completed"
- Customer On-Hold Order — sent when the order status changes to "On Hold"
The list of email IDs is filterable via the wcsp_tracking_email_ids filter hook. Admin notification emails do not receive the tracking block.
Email Format
HTML emails: A branded block is appended after the order table, containing the tracking number as a clickable link and a "Track your parcel on Slovenska Pošta →" link.
Plain-text emails: The tracking number and full public tracking URL are appended as plain text.
The tracking section is only added when the order uses a Slovenská Pošta shipping method and has a tracking number set.
Action Hooks
You can add custom content before or after the email pickup point display:
add_action( 'wcsp_before_pickup_point_email_display', function( $order, $sent_to_admin, $plain_text ) {
// $order = WC_Order
// $sent_to_admin = bool
// $plain_text = bool
}, 10, 3 );
add_action( 'wcsp_after_pickup_point_email_display', function( $order, $sent_to_admin, $plain_text ) {
// ...
}, 10, 3 );
See Hooks & Filters for the full reference.
Customer Pages
Thank You Page
After a successful checkout, WooCommerce displays an order confirmation page (the "Thank You" page). When Show on Thank You Page is enabled in settings, the selected pickup point’s name, address, and opening hours are displayed below the order table on this page.
The display is added via the woocommerce_order_details_after_order_table hook.
To disable: set Show on Thank You Page to No in WP-Admin > Slovenská Pošta > Pickup Points.
My Account — View Order
Logged-in customers can view their past orders under My Account > Orders > View Order. When Show in My Account — View Order is enabled in settings, the pickup point details are shown below the order items table on this page.
This uses the same woocommerce_order_details_after_order_table hook as the Thank You page — the plugin checks the current page context to determine which display setting to apply.
To disable: set Show in My Account — View Order to No in WP-Admin > Slovenská Pošta > Pickup Points.
Display Format
Both the Thank You page and the My Account order view use the same HTML layout:
- Pickup point name as a heading.
- Address (street, number, postal code, city).
- Opening hours table with days and hours.
The display is styled by the plugin’s frontend stylesheet (wcsp-pp-checkout.css).
Parcel Tracking
When a tracking number has been set on an order and the tracking feature is enabled, tracking information is shown on customer-facing order pages.
My Account — View Order (Tracking Number Row)
A Tracking Number row is added to the order totals table. The tracking number is displayed as a clickable link pointing to the public Slovenská Pošta tracking page.
Controlled by: tracking_in_my_account setting in WP-Admin > Slovenská Pošta > Tracking.
Thank You Page and View Order (Progress Section)
A tracking progress section is shown below the order table. It contains:
5-step progress bar — steps are activated as events are received:
| Step | Label (home delivery) | Label (pickup point orders) |
|---|---|---|
| 1 | Registered | Registered |
| 2 | Accepted | Accepted |
| 3 | In Transit | In Transit |
| 4 | Out for Delivery | Available for Pickup |
| 5 | Delivered | Picked Up |
The label for steps 4 and 5 adapts automatically based on whether the order has a pickup point selected (_wcsp_pickup_point_id meta present).
Event timeline — a collapsible list of all tracking events, newest first. Each row shows the date/time, status label, description, and location.
The tracking section can be refreshed via AJAX without reloading the page.
Controlled by: tracking_in_thank_you setting in WP-Admin > Slovenská Pošta > Tracking.
Controlling Display per Context
Each display context is independently controlled:
| Context | Setting Key | Default |
|---|---|---|
| Order confirmation emails | display_in_email | Yes |
| Thank You page | display_in_thank_you | Yes |
| My Account — View Order | display_in_view_order | Yes |
All settings are found in WP-Admin > Slovenská Pošta > Pickup Points.