• Resolved juliasavory

    (@juliasavory)


    Hello. I use Iconic Delivery Slots to allow my customers to choose time and date for their food deliveries. I would like to see their choices on the Invoice that I send with the order. Does your plugin work with Iconic to allow this to happen please?

Viewing 1 replies (of 1 total)
  • Hi @juliasavory,

    Could you please try adding the below code and check whether it is working fine or not.

    Code:
    /**
    * Add this code snippet in functions.php file of your currently active theme.
    * An example that adds a ‘VAT’ and ‘Customer Number’ field to the end of the list.
    */
    function example_custom_order_fields( $fields, $order ) {
    $new_fields = array();

    if( get_post_meta( $order->id, ‘your_meta_field_name’, true ) ) {
    $new_fields[‘your_meta_field_name’] = array(
    ‘label’ => ‘VAT’,
    ‘value’ => get_post_meta( $order->id, ‘your_meta_field_name’, true )
    );
    }

    if( get_post_meta( $order->id, ‘your_meta_field_name’, true ) ) {
    $new_fields[‘your_meta_field_name’] = array(
    ‘label’ => ‘Customer Number’,
    ‘value’ => get_post_meta( $order->id, ‘your_meta_field_name’, true )
    );
    }

    return array_merge( $fields, $new_fields );
    }
    add_filter( ‘wcdn_order_info_fields’, ‘example_custom_order_fields’, 10, 2 );

    Also, please replace the meta key with the custom one which you want to add.

    Do let us know how it goes.

    Regards,
    Kenil Shah

Viewing 1 replies (of 1 total)

The topic ‘Does this work with ICONIC Delivery Slots plugin’ is closed to new replies.