How to add custom checkout field in user details mail template

I need to add custom field from my checkout page to email templates. I already added custom input at checkout page and it shows up in mails but it shows up after products table and I would like it to show up in customer details. I can’t find right hook to place it there. Code for my custom field:

// Hook in add_filter('woocommerce_checkout_fields', 'custom_override_checkout_fields');  // Our hooked in function - $  fields is passed via the filter! function custom_override_checkout_fields($  fields) {    //New input   $  fields['billing']['OIB'] = array(     'label'     => __('OIB', 'woocommerce'),     'placeholder'   => _x('OIB', 'placeholder', 'woocommerce'),     'required'  => true,     'class'     => array('form-row-wide'),     'clear'     => true   );    return $  fields; }  /**  * Update the order meta with field value  */ add_action('woocommerce_checkout_update_order_meta', 'my_custom_checkout_field_update_order_meta');  function my_custom_checkout_field_update_order_meta($  order_id) {   if (!empty($  _POST['OIB'])) {     update_post_meta($  order_id, 'OIB', sanitize_text_field($  _POST['OIB']));   } }   /**  * Display field value on the order edit page  */ add_action('woocommerce_admin_order_data_after_billing_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1);  function my_custom_checkout_field_display_admin_order_meta($  order) {   echo '<p><strong>' . __('OIB') . ':</strong> ' . get_post_meta($  order->id, 'OIB', true) . '</p>'; }   /* To use:  1. Add this snippet to your theme's functions.php file 2. Change the meta key names in the snippet 3. Create a custom field in the order post - e.g. key = "OIB" value = 134852145798 4. When next updating the status, or during any other event which emails the user, they will see this field in their email */ add_filter('woocommerce_email_order_meta_keys', 'my_custom_order_meta_keys');  function my_custom_order_meta_keys($  keys) {   $  keys[] = 'OIB'; // This will look for a custom field called 'OIB' and add it to emails   return $  keys; }  //Micanje Checkout polja add_filter('woocommerce_billing_fields', 'bbloomer_move_checkout_email_field', 10, 1);  function bbloomer_move_checkout_email_field($  address_fields) {   $  address_fields['billing_email']['priority'] = 25;   $  address_fields['OIB']['priority'] = 26;   $  address_fields['billing_phone']['priority'] = 27;   $  address_fields['billing_country']['priority'] = 28;   return $  address_fields; }  // Custom validacija za OIB add_action('woocommerce_checkout_process', 'custom_validate_OIB'); function custom_validate_OIB() {   $  is_correct = preg_match('/^[0-9]{11}$  /', $  _POST['OIB']);   if ($  _POST['OIB'] && !$  is_correct) {     wc_add_notice(__('OIB se sastoji od <strong>11 brojki</strong>.'), 'error');   } } 

I use NP Quote Request plugin which has it’s own email templates. I think that one of these hooks at the bottom of email template php file controls customer details.

do_action('woocommerce_email_after_order_table', $  order, $  sent_to_admin, $  plain_text);  do_action('woocommerce_email_order_meta', $  order, $  sent_to_admin, $  plain_text);  do_action('woocommerce_email_confirmation_messages', $  order, $  sent_to_admin, $  plain_text);  do_action('woocommerce_email_customer_details', $  order, $  sent_to_admin, $  plain_text, $  email);   try {     do_action('woocommerce_email_footer'); } catch (Exception $  ex) { } 

Any help on which hook I should target or what I should do would be great. Thanks.

Adding the FAQ on the checkout is a good action?

Adding the FAQ on the bottom of the checkout page is a good action? This could affect my conversion rate positively or negatively?

I’m thinking to do it because some customers have doubts before proceeding to pay and in some case the delivery price changes (because the user adds different address). But I’m afraid that could be a distraction and generate more doubts.

Woocommerce modifying checkout fields?

I’m trying to modify the label of the first billing address line by hooking into the filter woocommerce_billing_fields my simple code is:

function modify_address_field( $  fields ) {     $  fields['billing_address_1']['label'] = 'Address';      return $  fields; } add_filter( 'woocommerce_billing_fields', 'modify_address_field' ); 

But on the checkout page, it briefly shows the modified label before quickly reverting to the original… ‘Street Address’. So it looks like there is some javascript trickery going on somewhere.

The only filter I’ve found that doesn’t get reverted back is woocommerce_default_address_fields – but if I use that filter, then it changes the label of both the billing and the shipping address… that’s not what I want!

Can anyone explain exactly whats going on here??

I’m using roots/sage as my starter theme, latest versions of WordPress and Woo with minimal plugins

Many thanks

Ayuda para implementar correctamente Mobile Checkout

Estoy haciendo una implementación de Mobile Checkout en Node y Android para un e-commerce.

Mi backend crea la preferencia, la guarda en la orden de compra y luego regresa la orden con las preferencias al cliente, este usa el id de la preferencia para continuar con el pago.

Ahora, cuando realizo el pago (tarjetas de prueba), la respuesta me trae el id del pago, el cual lo envío al backend para actualizar la orden de compra.

Mi problema es, cuando obtengo el pago (en backend), no encuentro algún campo que relacione ese pago con la preferencia creada previamente, necesito esto para de poder confirmar que el pago pertenece a una orden, no puedo relacionarlo con el id la orden que me envía el cliente móvil porque eso sería una vulnerabilidad.

Es posible que me estoy saltando algo, espero puedan ayudarme con eso. Muchas gracias.

Redirect to checkout instead of cart

I have a cart icon in the top navigation bar and when clicked, the page will redirect to checkout instead of the shopping cart page.

My reason is, the shopping cart page contains a table that displays the items added by the customer while the checkout page has the form for billing address and again, the table for displaying the items that are added to cart.

So I came up with the decision to just redirect to checkout instead of cart page to improve convenience and its only redundant if customer’s will go to cart page to see their items and then checkout where they can see it also.

VPSLOT – KVM Plans with 50% off Coupon Codes to use at checkout!

VPSLOT sent in two great deals on some KVM VPS offers, with 50% off coupon codes for the community! We thought that was worth sharing with you. VPSLOT wanted us to know that they deal in shared hosting, VPS hosting and dedicated servers. They also shared with us that they provide high quality service with an amazing support team. Check out their KVM offers below and should you order, as always we encourage our readers to share their thoughts below in the comments section.

Their WHOIS is public and you can find their ToS/Legal Docs here. They accept Paypal, Credit Cards, Bitcoin, Perfect Money
and Webmoney as payment methods.

Here’s what they had to say: 

“VpsLot Hosting Services is a project of Rapid Solutions LTD. is a company specializing in Domain names, webhosting, VPS and dedicated servers. Our servers are located in the USA and even more locations are coming soon. We are providing top range and top quality Web hosting, Virtual Private servers.”

Here are the offers: 

Mega Budget

  • 512MB RAM
  • 1 CPU CORE
  • KVM Virtualization
  • 500GB transfer
  • 1Gbps uplink
  • 1x IPv4
  • /64 IPv6
  • 50% off Coupon Code: BW8G9KN5KE
  • $ 1.20/mo

Mega 1K

  • 1GB RAM
  • KVM Virtualization
  • 1000GB transfer
  • 1Gbps uplink
  • 1x IPv4
  • /64 IPv6
  • 50% off Coupon Code: BW8G9KN5KE
  • $ 4.20/mo


New York City, New York, USA

Test IPv4:

Test file:

Host Node Specifications:


– 32GB RAM

– 4x 2TB HDDs

– Hardware RAID10

– 1Gbps uplink

Please let us know if you have any questions/comments and enjoy!

The post VPSLOT – KVM Plans with 50% off Coupon Codes to use at checkout! appeared first on Low End Box.