我需要在(v2 / class-wc-api-order.php)woocommere的order_data数组中添加一些参数,并且我已经创建了一个插件,所以我的更改不会被每次更新覆盖,但我无法管理从班上获得身份证?
我希望$ id与我使用API发送的ID相同
$id =
$order = wc_get_order( $id );
$olddata = array(
'first_name' => $order->shipping_first_name,
'last_name' => $order->shipping_last_name,
'company' => $order->shipping_company,
'address_1' => $order->shipping_address_1,
'address_2' => $order->shipping_address_2,
'city' => $order->shipping_city,
'state' => $order->shipping_state,
'postcode' => $order->shipping_postcode,
'country' => $order->shipping_country,
);