• I’ve added custom fields to the checkout by I cant seem to get the fields to carry over. I can get one to send, but how do i get three to send with emails. I tried to repeat the function, but not luck. Thanks for the help!

    Code for Email:

    /**
    * Add the field to order emails
    **/
    add_filter(‘woocommerce_email_order_meta_keys’, ‘my_custom_checkout_field_order_meta_keys’);

    function my_custom_checkout_field_order_meta_keys( $keys ) {
    $keys[] = ‘My Field’;
    return $keys;
    }

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 1 replies (of 1 total)
  • corsonr – a11n

    (@corsonr)

    Automattic Happiness Engineer

    hi,

    simply use
    /**
    * Add the field to order emails
    **/
    add_filter(‘woocommerce_email_order_meta_keys’, ‘my_custom_checkout_field_order_meta_keys’);

    function my_custom_checkout_field_order_meta_keys( $keys ) {
    $keys[] = ‘My 1st Field’;
    $keys[] = ‘My 2nd Field’;
    $keys[] = ‘My last Field’;
    return $keys;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Adding Multiple Custom Fields to email Template’ is closed to new replies.