Custom field values not exporting
-
Your plugin has been working wonderfully, but recently my custom fields have not been properly exporting.
The field name is exported in the CSV, but the value is empty. I added the custom fields to the dropdown using PHP, and it was working previously, but I no longer see them in the dropdown. However, they still appear in the checked list of fields to export.
The custom fields I am trying to export are located within the user profile, and are labeled as TaxType and BrandingTheme.
This is the code I used to create the fields in the dropdown:
add_filter('woe_get_order_fields_user', 'add_user_fields'); function add_user_fields($fields) { $fields['brandingtheme'] = array('segment'=>'user','label'=>'BrandingTheme','colname'=>'BrandingTheme','value'=>'','checked'=>1); $fields['taxtype'] = array('segment'=>'user','label'=>'TaxType','colname'=>'TaxType','value'=>'','checked'=>1); return $fields; } add_filter('woe_get_order_csv_value_brandingtheme', 'get_user_custom_field', 10, 2 ); function get_user_custom_field($value,$order) { $user_id = $order->get_user_id(); return get_user_meta($user_id, 'brandingtheme', true); } add_filter('woe_get_order_csv_value_taxtype', 'get_user_custom_field2', 10, 2 ); function get_user_custom_field2($value,$order) { $user_id = $order->get_user_id(); return get_user_meta($user_id, 'taxtype', true); }Any ideas or insights as to why it no longer works would be greatly appreciated. Thank you!
The topic ‘Custom field values not exporting’ is closed to new replies.