Skip to content

Use WC order number (get_order_number) instead of ID #18

@ulrikmoe

Description

@ulrikmoe

Is your feature request related to a problem? Please describe.
Some of our customers have reported difficulties matching WooCommerce orders with Scanpay payments due to a mismatch between the internal WooCommerce order ID (get_id()) and the visible order number (get_order_number()).

Many bookkeeping systems and third-party integrations rely on the order number — as this is what merchants and customers see in the WooCommerce admin, emails, and invoices. Since the Scanpay plugin currently uses the internal order ID in the orderid field sent to the Scanpay API, it becomes difficult for merchants to reconcile transactions across systems.

Describe the solution you'd like
Update the plugin to use $order->get_order_number() instead of $order->get_id() when setting the orderid field in the Scanpay API request, and in any other external-facing references to the order.
This would improve interoperability with other WooCommerce-compatible systems and align with best practices used by other payment gateways.

Describe alternatives you've considered
One possible alternative is to add a plugin setting that allows merchants to choose between using the internal ID or the order number for the orderid field. However, using the order number by default would match expectations in most cases.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions