Home Forums WoodMart support forum How to translate custom admin order page fields with loco ?

How to translate custom admin order page fields with loco ?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #248347

    Agora
    Participant

    Hello, I’ve tried to add few custom fields in my order page (including tracking number, delivery date and delivery time) with the below code at my function.php file. And I would like to translate the custom fields with loco translation plugin but I am unable to locate those custom fields, could you please advise, thanks!

    /**
    * Add a custom field (in an order) to the emails
    */
    add_filter( ‘woocommerce_email_order_meta_fields’, ‘custom_woocommerce_email_order_meta_fields’, 10, 3 );

    function custom_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) {
    $fields[‘tracking_number’] = array(
    ‘label’ => __( ‘Tracking Number’ ),
    ‘value’ => get_post_meta( $order->id, ‘tracking_number’, true ),
    );

    $fields[‘delivery_date’] = array(
    ‘label’ => __( ‘Delivery Date’ ),
    ‘value’ => get_post_meta( $order->id, ‘delivery_date’, true ),
    );

    $fields[‘delivery_time’] = array(
    ‘label’ => __( ‘Delivery Time’ ),
    ‘value’ => get_post_meta( $order->id, ‘delivery_time’, true ),
    );

    return $fields;
    }

    #248349

    Agora
    Participant

    This is the email template showing those custom fields, which I would like to translate in Chinese thanks!

    Attachments:
    You must be logged in to view attached files.
    #248352

    Agora
    Participant

    Please find the login details

    #248394

    Hello,

    Please contact the translation plugin support as our theme does not have any options for the translation.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)