• Resolved aravind21

    (@aravind21)


    I have created custom fields in the variations form in woocommerce and saving the data to order item meta after purchasing the product. I would like to export that data. When I tried to use “setup fields to export” option, I was not able to see the meta key that I am using to save custom fields, in the drop down and can’t see any data with the meta key I enter in the text field given below drop down. How can I export the data under a meta key which is not available in that dropdown?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    Please, use >Setup Fields>Product Order Items>Add Field.

    The button “Add Field” shows a bit different keys for each section.

    thanks, Alex

    Thread Starter aravind21

    (@aravind21)

    I have tried that. for example: I have added custom_field meta key. custom_field is not available in the dropdown. I tried entering it manually in the text field given below the dropdown. But under that column I can’t see any data after I export.

    Plugin Author algol.plus

    (@algolplus)

    do you see this meta_key in table wp_woocommerce_order_itemmeta ?

    Thread Starter aravind21

    (@aravind21)

    Yeah, I have a field for email address. I have saved the value to item meta with meta_key attendee_email_address after the purchase is done. but I am unable to export it.

    Plugin Author algol.plus

    (@algolplus)

    do you use “Add Field” in section “Product Order Items” ?

    Thread Starter aravind21

    (@aravind21)

    Oh Sorry, I was adding the field in the section “common”. I am able to see the fields in “product order items” section. Thank You.

    Thread Starter aravind21

    (@aravind21)

    Is there any way I can get the data attendee_email_address for the same order when I refund it? When I export it, I am not able to see the email for refunded items.

    Plugin Author algol.plus

    (@algolplus)

    Please, open section Filter By Product and turn off “Skip fully refunded items”

    Thread Starter aravind21

    (@aravind21)

    It is already turnoff.

    For the refunded items I can see the billing info. but I can’t see the custom fields data in the exported file.

    Plugin Author algol.plus

    (@algolplus)

    please, submit your settings as new ticket to https://algolplus.freshdesk.com/
    use tab “Tools” to get them.

    I’ll reply to ticket later today.

    Plugin Author algol.plus

    (@algolplus)

    item meta attendee_email_address was assigned to original item ,
    so we had to add some code to section “Misc Settings” to get correct value

    add_filter('woe_get_order_product_value_attendee_email_address', function ($value, $order, $item, $product,$item_meta) {
    	$original_item_id = $item->get_meta( '_refunded_item_id', true );
    	if($original_item_id) {
    		$value = wc_get_order_item_meta( $original_item_id, 'attendee_email_address', true );
    	}
    	return $value;
    }, 10, 5);
    • This reply was modified 3 years, 3 months ago by algol.plus.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Export Custom data in order item meta table’ is closed to new replies.