Skip to content

Commit

Permalink
Using the PosInvoice field to store the WooCommerce order number in DK
Browse files Browse the repository at this point in the history
This replaces the Reference field, which seems to have a different purpose.
  • Loading branch information
aldavigdis committed Jul 18, 2024
1 parent 9527ad4 commit 8ea90d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions src/Export/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ public static function to_dk_invoice_body(
): array {
$invoice_body = ExportOrder::to_dk_order_body( $wc_order );

$invoice_body['PosInvoice'] = $wc_order->get_id();
$invoice_body['SalesPerson'] = Config::get_default_sales_person_number();

$payment_mapping = Config::get_payment_mapping(
Expand Down
2 changes: 0 additions & 2 deletions src/Export/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ public static function to_dk_order_body( WC_Order $wc_order ): array {
$recipient_array = array();
$customer_array = array( 'Number' => $kennitala );

$order_props['Reference'] = 'WC-' . $wc_order->get_id();

$recipient_array['Name'] = $wc_order->get_formatted_billing_full_name();
$recipient_array['Address1'] = $wc_order->get_shipping_address_1();
$recipient_array['Address2'] = $wc_order->get_shipping_address_2();
Expand Down

0 comments on commit 8ea90d9

Please sign in to comment.