To those who need it (not thanks to plugin support!):
The label is stored only in the plugin settings, not in post meta.
Moreover, be careful because value and label are in a single string separated by ” : “, so if you use it in your “value”, you will break it (there is no check to replace the character).
// get the array of the plugin settings
$settingList = get_option( 'inspire_checkout_fields_settings' );
// get value : option of the desired field (in this case "my_field_name" under "order" block)
$myString_value_label = $settingList ['order']['my_field_name']['option'];
// get only the label
$myString_label = substr($myString_value_label ,strpos($myString_value_label ,' : ')+3);
Hope could be helpful.
Nadia
-
This reply was modified 2 years, 10 months ago by maipiusenza.