• Resolved Demian

    (@demian85)


    Hi,

    I went through several tickets and documentation, but I am not able to figure out how I can echo the value from an element id from an order, below is a trial:

    function show_efo_value(){
    	if ( get_the_ID() == 95 ) {
    		echo '<p>' . THEMECOMPLETE_EPO_API()->get_option( $order->get_id(), '610a8dd8da7fb5.30395416') . '</p>';
    	}
    }
    add_action( 'admin_head', 'show_efo_value', 0);

    I hope you can guide me into the right direction to return the value of the extra options fields from the order.

    Thanks a lot.
    Demian

    • This topic was modified 3 years, 7 months ago by Demian.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    We are saving the Extra Product Options data as order item meta data.

    You can retrieve the value using the below function.

    wc_get_order_item_meta($item_id, $field_name, true);

    We hope this helps.

    Thank you!

    Thread Starter Demian

    (@demian85)

    Hi @themehigh

    Thank you. Your snippet should come in place of my line starting with echo?

    Thanks.

    Plugin Author ThemeHigh

    (@themehigh)

    We have once again gone through your code and can see THEMECOMPLETE in it. Could you please confirm whether you are using our plugin or not?

    As per the code, we believe that you are using THEMECOMPLETE’s Extra product options plugin. Please verify the author of the plugin you are using.

    Thank you!

    Thread Starter Demian

    (@demian85)

    @themehigh this echo is coming from a question on your support forum, I’m not using any add-ons. So I need to put your snippet to echo a value?

    Plugin Author ThemeHigh

    (@themehigh)

    We believe that you have misunderstood our update.

    Could you please verify the author of the “Extra Product Option” plugin that you are using on your website?

    We believe that you are not using our plugin. This is the reason why we have asked you to verify the author.

    Thank you!

    Thread Starter Demian

    (@demian85)

    Hi @themehigh

    Yes, I notice now that my plugin is coming from a different theme provider; you both use the exact same plugin name: fairly confusing. Thanks for pointing out and apologies for this error.

    Thanks,
    Demian

    Plugin Author ThemeHigh

    (@themehigh)

    Thank you for letting us know ??

    Have a great day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Get element value from order’ is closed to new replies.