如何将重力表数据显示到 woocommerce 我的帐户订单表?
已发表: 2022-11-05我创建了一个重力表并集成到 woocommerce 中,我需要将我在重力表上输入的数据显示到 woocommerce 我的帐户/订单/页面中的订单表。
https://preview.redd.it/m21nuvpfoyx91.png?width=881&format=png&auto=webp&s=f21e00a595f17f9e7647bb51923ac3fc2220da6d
您可以在第 14 行看到我试图通过 echo 调用它,但找不到正确的代码。 我寻找 get_meta 等。我对此不熟悉。
这是 $order 数组数据。
[cache_group:protected] => 订单项
[meta_data:protected] => 数组
(
[0] => WC_Meta_Data 对象
(
[current_data:protected] => 数组
(
[id] => 5001
[键] => _gravity_forms_history
[值] => 数组
(
[_gravity_form_cart_item_key] => c4e6d20004a3c6cd9602b4caf96ad709
[_gravity_form_linked_entry_id] => 2966
[_gravity_form_lead] => 数组
(
[表格编号] => 12
[source_url] => https://passportdepot.kubemax.com/product/passport-service/?country_1=United+States&state_1=Alabama&passport_service_1=New+US+Passport&passport-product=7-10++++天
[ip] => 180.190.148.57
[1] => 2022-11-19
[3] =>
[6] => 恩佐
[7] => 销售
[8] => [电子邮件保护]
[9] => 12321312321
[10] => 1985-11-16
[11] => 美国
[155] => 7-10 天|999
[12] => 阿拉巴马州
[13] => 新美国护照
[74.1] =>
[73.1] =>
[73.2] =>
[73.3] =>
[58.1] =>
[156]=>
[170]=>
[171]=>
[48.2]=>
[48.3] =>
[48.4] =>
[48.6] =>
[48.8] =>
[49]=>
[50]=>
[51]=>
[53]=>
[55]=>
[56]=>
[160.1] =>
[162.1]=>
[162.2]=>
[162.3]=>
[59.1] =>
[153]=>
[174]=>
[175]=>
[60.2] =>
[60.3] =>
[60.4] =>
[60.6] =>
[60.8] =>
[61]=>
[62]=>
[63]=>
[64]=>
[65]=>
[66]=>
[165.1] =>
[167.1] =>
[167.2]=>
[167.3] =>
[103] => 第一选择
[104]=>
[105]=>
[106]=>
[107]=>
[24] => FedEx Priority Overnight $69|69
[179] => FedEx Priority Overnight $69|69
[31] => 1137
)