• Resolved alamoreality

    (@alamoreality)


    Thanks so much in advance…

    The order number field exports fine initially (fresh plugin install, before adding fields), but when I try to add another field, which in our case will also be the order number, the fields export blank. Not sure what I am missing here? Hopefully something simple. All I am doing is adding the meta key and column name. Thanks!

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

    (@algolplus)

    hi

    Did you select “meta key” from the dropdown or typed it in text field?

    The plugin pulls custom fields from existing orders,
    so you should create test order, fill new field and re-add field (select “meta key” from dropdown) to the export.

    thanks, Alex

    Thread Starter alamoreality

    (@alamoreality)

    Hi Alex, thank you for the reply. I typed “Order Number” in the meta key field, simply trying to replicate the column that the plugin initially contains.

    I am getting the proper order number in the first Order Number field (Same as before), however, I am not getting the Order Number in the Second Order Number field – the one that I added. I am also not seeing Order Number or “meta key” in the dropdown menu. I just need to have the Order Number in a column with a different Column Name.

    Thanks so much for your help.

    Plugin Author algol.plus

    (@algolplus)

    so you want to use same field twice ?
    I’m sorry, it won’t work by default

    try this code

    // add new field  
    add_filter('woe_get_order_fields', function ($fields) {
    	$fields['number_2'] = array( 'label' => 'Order number 2', 'colname' => 'Order number 2', 'checked' => 1 );
    	return $fields;
    });
    // calculate  new field
    add_filter('woe_get_order_value_number_2', function ($value,$order, $field) {
    	return $order->get_order_number();
    }, 10, 3);
    Thread Starter alamoreality

    (@alamoreality)

    Alex, forgive my ignorance, but would I place that code in the custom PHP area?

    If so, would I then add a field with the meta value of ‘woe_get_order_value_number_2’?

    Am I missing something?

    Plugin Author algol.plus

    (@algolplus)

    wow! you suggested even better way.

    1. Yes, click “Add field”, type “number_2” in text field(below dropdown), fill “Column” and press “Confirm”.

    2. add following code to section “Misc Settings” to calculate value

    add_filter('woe_get_order_value_number_2', function ($value,$order, $field) {
    	return $order->get_order_number();
    }, 10, 3);

    thank you, Alex

    Thread Starter alamoreality

    (@alamoreality)

    Alex, thank you! Thank worked. Excellent support.

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome.

    have a good weekend

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Order number not showing’ is closed to new replies.