Picking Value from Array for Woocommerce

2 May, 2022 01:38:54
Colemont
Topics: 7
Messages: 19
Is it possible to get a specific Value from this array, that is saved by woocommerce for use in e2pdf?

It is currently saved as order_item_meta in databse, but i would specifically need to use just value under 0,0,value string

[e2pdf-wc-order key="line_item" subkey="rn_line_items" index="0" order_item_meta="true"]

Array
(
[0] => stdClass Object
(
[Label] =>
[Id] => 1
[Type] => globalcontainer
[PriceType] => none
[Price] => 0
[SalePrice] => 0
[Quantity] => 1
[UnitPrice] => 0
[Value] => Array
(
[0] => stdClass Object
(
[Label] => Objekto pavadinimas
[Id] => 1
[Type] => text
[PriceType] => none
[Price] => 0
[SalePrice] => 0
[Quantity] => 1
[UnitPrice] => 0
[Value] => sdsdghsdgsdg <---------- THIS VALUE
)

[1] => stdClass Object
(
[Label] => Draudimas galioja nuo
[Id] => 2
[Type] => datepicker
[PriceType] => none
[Price] => 0
[SalePrice] => 0
[Quantity] => 1
[UnitPrice] => 0
[Unix] => 1651795200
[Value] => 2022 05 06
)

[2] => stdClass Object
(
[Label] => Draudimas galioja iki
[Id] => 3
[Type] => datepicker
[PriceType] => none
[Price] => 0
[SalePrice] => 0
[Quantity] => 1
[UnitPrice] => 0
[Unix] => 1652918400
[Value] => 2022 05 19
)

)

[GlobalId] => 1
[HideInCart] =>
[FieldName] =>
)

)
2 May, 2022 01:44:01
Colemont
Topics: 7
Messages: 19
Also it's a serialized object
2 May, 2022 02:49:18
Colemont
Topics: 7
Messages: 19
In other words - i have array (image attached), and i need a specific value shown in same image attached to be printed in PDF.

[e2pdf-wc-order key="line_item" subkey="rn_line_items" index="0" order_item_meta="true"] <- this shortcode only shows whole array. How do i modify it to pick only required Value?
2 May, 2022 04:27:51
E2Pdf
Support
Topics: 7
Messages: 3330
Hi,

Update plugin please to RC version 1.17.x by following steps in current topic: https://e2pdf.com/support/desk/how-to-update-plugin-to-rc-release-candidate-version-from-e2pdf-com

After update try please to use shortcode:
[e2pdf-wc-product key="rn_line_items" order_item_meta="true" index="0"]

Will it be same output?

P.S. Can you also please copy full value from PhpMyAdmin as text value here or somewhere so we can unserialize it manually to check the complete structure as it could be required to use PHP hook.
We would really appreciate your feedback at WordPress.org!
4 May, 2022 02:15:04
Colemont
Topics: 7
Messages: 19
I've already sold this problem by choosing other plugin with different structure on database. No array - no problems. You can close this topic :) Sorry for stealing your time