• I love this plug-in, the best at handling custom fields, thank you for your work on this.

    Question (and sorry if I missed this in the forums, I couldn’t find it):

    Is there an easy way to grab the client entered field information (specifically the email field) for use in other plug-ins? I’m hoping a merge tag exists or there is an easy way to create them.

    Specifically, I’m using WC Follow-Ups and would like to be able to use a merge tag to call that information and put it into a new email (https://docs.woothemes.com/document/automated-follow-up-emails-docs/custom-variables/).

    It would also be nice to pull them into MailChimp (or similar) apps to add those emails to lists, beyond just the purchaser.

    I’m handy with basic code, but found the variable creation over my head. I know those second plug-ins I mentioned are not yours, so just writing with the long shot hope that you or someone else has come across this and has a solution.

    Thanks either way! Again, the plug-in is awesome.

    https://www.ads-software.com/plugins/wc-fields-factory/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Saravana Kumar K

    (@mycholan)

    Hi, thanks for your comment.

    All custom fields are stored as order line meta, which could be easily retrieved by using wc_get_order_item_meta().

    You can do something like this

    $order = new WC_Order( $order_id );
    foreach ( $order->get_items() as $item_id => $item ) {
    	wc_get_order_item_meta( $item_id, "your_item_meta_key", true );
    }

    Thread Starter nyckl

    (@nyckl)

    Thanks,

    As I said, I’m pretty novice to coding. I can do basic stuff, but I don’t understand how I would use this. Do you have any examples of the code I could use to create a meta tag for email fields created with your plug-in?

    Or if you could direct me to how I would change the code you gave me, would I type something in place of the “your_item_meta_key”? And if so, what would I type in its place or where would I find the information I need? I tried looking in your plugin folders in FTP, but I find them overwhelming and I’m not sure where to look.

    This might be asking a lot and if so feel free to pass. Just searching for help.

    Thanks very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Merge tags to pull client entered info – esp email fields?’ is closed to new replies.