show phone and mail shipping for export orders
-
I need to show email and phone number for export orders in woocommerce. I have this code for export weight. Which code can I use to show email and phone shipping?
/** * Step 1. Add weight to line item data * * @param array $line_item the original line item data * @param array $item the item's order data * @param object $product the \WC_Product object for the line * @param object $order the \WC_Order object being exported * @return array the updated line item data */ function sv_wc_csv_export_add_weight_to_line_item( $line_item, $item, $product, $order ) { $new_item_data = array(); foreach ( $line_item as $key => $data ) { $new_item_data[ $key ] = $data; if ( 'sku' === $key && $product ) { $new_item_data['weight'] = wc_format_decimal( $product->get_weight(), 2 ); } } return $new_item_data; } add_filter( 'wc_customer_order_export_csv_order_line_item', 'sv_wc_csv_export_add_weight_to_line_item', 10, 4 );
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘show phone and mail shipping for export orders’ is closed to new replies.