Skip to content

Commit

Permalink
Use immutable WC order ID for KOMOJU sessions
Browse files Browse the repository at this point in the history
WC_Order::get_order_number by default uses the order ID, but seems that
it can be changed.

* https://wp-kama.com/plugin/woocommerce/function/WC_Data::get_id
  • Loading branch information
FTLam11 committed Dec 2, 2022
1 parent 6ceda6c commit 22b5923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class-wc-gateway-komoju.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function process_payment($order_id, $payment_type = null)
],
'line_items' => $line_items,
'metadata' => [
'woocommerce_order_id' => $order->get_order_number(),
'woocommerce_order_id' => $order->get_id(),
],
];
$remove_nulls = function ($v) { return !is_null($v); };
Expand Down

0 comments on commit 22b5923

Please sign in to comment.