Render label from metabox.io select field

June 10, 2024 00:52:29
eliodata
Topics: 19
Messages: 57
Hi,

I would like to display the label from a metabox.io select field. I have tried this:
[e2pdf-wc-order key="fsbdd_check_exotva" meta="true" show="label"]
But it still give me the value.
the field choices are like this:

NON:FSC
OUI:FS
JE NE SAIS PAS:TODO

Thank you!
June 10, 2024 01:58:44
E2Pdf
Topics: 7
Messages: 3617
Support
Hello,

meta="true" - gets the value exactly as it's saved in the database.

Can you please clarify:

- What is the example output of [e2pdf-wc-order key="fsbdd_check_exotva" meta="true"]
- Do you have any other keys in Visual Mapper with fsbdd_check_exotva?
- Do you see the label value on the WooCommerce Order page?

We would really appreciate your feedback at WordPress.org!
June 10, 2024 03:06:18
eliodata
Topics: 19
Messages: 57
Thank you for the quick answer!
Sorry for my poor english...
i use this select field in the woocommerce order front end page and woocommerce order admin page.
I have tried 4 skortcodes:

[e2pdf-wc-order key="fsbdd_check_exotva" meta="true" show="label"]
[e2pdf-wc-order key="fsbdd_check_exotva"]
[e2pdf-wc-order key="fsbdd_check_exotva" show="value"]
[e2pdf-wc-order key="fsbdd_check_exotva" show="label"]

All render "OUI" instead of "FS".

The visual mapper only find this key:
[e2pdf-wc-order key="fsbdd_check_exotva" meta="true"]

best regards
June 10, 2024 03:10:04
E2Pdf
Topics: 7
Messages: 3617
Support
In this case, unfortunately, it seems metabox.io doesn't save "labels" in the metadata. You can try to use search / replace and replace values to labels:

[e2pdf-format-output search="NON|||OUI|||JE NE SAIS PAS" replace="FSC|||FS|||TODO"][e2pdf-wc-order key="fsbdd_check_exotva" meta="true"][/e2pdf-format-output]

We would really appreciate your feedback at WordPress.org!
June 10, 2024 03:29:12
eliodata
Topics: 19
Messages: 57
The search replace works great.
Thank you!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.