Order Management

Order Management Interface

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.


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.


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.


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).


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.