Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    You can surely reorder fields using ‘wpg_order_columns’ filter in main.php file.

    Let me know if you have any query.

    Regards

    Thread Starter sandradyl

    (@sandradyl)

    Hello,

    thank you for your answer, I couldn’t write before. I have changed the order of wpg_order_columns but this change only reorder the titles. I can order the new fileds I added but I don’t know how to mix and order the fileds I added and fields form the plugin.

    Could you tell me what I must do?
    Thank you
    Regards

    Hi,
    You have to use wc_settings_tab_order_export hook. See example below, I have shuffled order of Order status and Phone number.

    function shuffle_order($a) {
    
    return $settings = array(
    
    		'section_title' => array(
    			'name'     => __( 'WooCommerce Order Export', 'woocommerce-simply-order-export' ),
    			'type'     => 'title',
    			'desc'     => '',
    			'id'       => 'wc_settings_tab_orderexport_section_title'
    		),
    
    		'short_desc' => array(
    			'type'     => 'short_desc',
    			'desc'     => __( 'Please choose settings for order export.', 'woocommerce-simply-order-export' ),
    		),
    
    		'customer_name' => array(
    			'name' => __( 'Customer Name', 'woocommerce-simply-order-export' ),
    			'type' => 'checkbox',
    			'desc' => __( 'Customer Name', 'woocommerce-simply-order-export' ),
    			'id'   => 'wc_settings_tab_customer_name'
    		),
    
    		'product_info' => array(
    			'name' => __( 'Items Purchased', 'woocommerce-simply-order-export' ),
    			'type' => 'checkbox',
    			'desc' => __( 'Export product details.', 'woocommerce-simply-order-export' ),
    			'id'   => 'wc_settings_tab_product_info'
    		),
    
    		'amount' => array(
    			'name' => __( 'Amount', 'woocommerce-simply-order-export' ),
    			'type' => 'checkbox',
    			'desc' => __( 'Amount paid by customer', 'woocommerce-simply-order-export' ),
    			'id'   => 'wc_settings_tab_amount'
    		),
    
    		'email' => array(
    			'name' => __( 'Email', 'woocommerce-simply-order-export' ),
    			'type' => 'checkbox',
    			'desc' => __( 'Email of customer', 'woocommerce-simply-order-export' ),
    			'id'   => 'wc_settings_tab_customer_email'
    		),
    
    		'status' => array(
    			'name' => __( 'Status', 'woocommerce-simply-order-export' ),
    			'type' => 'checkbox',
    			'desc' => __( 'Order Status', 'woocommerce-simply-order-export' ),
    			'id'   => 'wc_settings_tab_order_status'
    		),
    
    		'phone' => array(
    			'name' => __( 'Phone', 'woocommerce-simply-order-export' ),
    			'type' => 'checkbox',
    			'desc' => __( 'Phone number of customer', 'woocommerce-simply-order-export' ),
    			'id'   => 'wc_settings_tab_customer_phone'
    		),			
    
    	);
    
    }
    add_filter('wc_settings_tab_order_export', 'shuffle_order');

    Let me know if this helps.

    Thread Starter sandradyl

    (@sandradyl)

    Hi,
    Thank you for your answer, but I think I haven’t explained well. The function before orders fields in the admin section. I will try to explain better. I want change the order in the file exported, I mean when I export the orders, I would like the following order:
    Invoice number (I have added this field)
    Invoice date (I have added this field)
    Email (Default plugin field)
    Payment Method (I have added this field)
    Customer Name (Default plugin field)

    Thank you.

    Hi sandradyl,

    This is a bug and I will soon release new version with this bug fixed in it.

    Thank you.

    Thread Starter sandradyl

    (@sandradyl)

    Ok!
    Thank you very much!

    Thread Starter sandradyl

    (@sandradyl)

    Hi Ankit,
    Is it possible to put the fields in order I indicate in the comment above with the new version? If so could you tell me how?

    Thank you

    Hi sandradyl,

    The new version is yet to be released. Since, we are making some significant changes under the hood, it is expected to be released in next few days.

    Regards

    Thread Starter sandradyl

    (@sandradyl)

    Ok, thank you Ankit!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change Order’ is closed to new replies.