PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]
Botoscope is currently in early access

Support Forum

You need to log-in to create request (topic) to the support

Fetch Order Currency Rate

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Every order stores a order currency rate shown on the right side panel on the order details page:

How do I fetch this value of a particular order in the backend.
Thank you!

Hello

This is meta data and its key is: _woocs_order_rate

If you want to place it into admin panel you should use wordpress hooks, and I cann suggest you next code which you should place into file functions.php of the current wp theme:

// 1. Add a new column to the list of orders
add_filter( 'manage_edit-shop_order_columns', 'add_woocs_order_rate_column', 20 );
function add_woocs_order_rate_column( $columns ) {
    $new_columns = array();

    foreach ( $columns as $key => $column ) {
        $new_columns[ $key ] = $column;
        if ( $key === 'order_total' ) { // add after the"Total" column
            $new_columns['woocs_rate'] = __( 'WOOCS Rate', 'textdomain' );
        }
    }

    return $new_columns;
}

// 2. Output the value for the new column
add_action( 'manage_shop_order_posts_custom_column', 'show_woocs_order_rate_column', 10, 2 );
function show_woocs_order_rate_column( $column, $post_id ) {
    if ( 'woocs_rate' === $column ) {
        $rate = get_post_meta( $post_id, '_woocs_order_rate', true );
        echo $rate ? esc_html( $rate ) : '-';
    }
}