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.

ASPNET EF ‘Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details.’

Hola amigos estoy tratando de hacer un insert a mi bd , pero obtengo este error

‘Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details.’

Este es mi Insert

    [Authorize]     [HttpPost]     public ActionResult InsertRole(string role,string id_userCreated)     {          using (DBEnt db = new DBEnt())         {              var rolx = new AspNetRoles()             {                 Name = role ,              };             db.AspNetRoles.Add(rolx);             //db..add(cat);             db.SaveChanges();         }         var action = "Insert";         var comments = "Contadores ingresada por el usuario : ";         InsertInBitacora(id_userCreated, action, comments + id_userCreated);         return RedirectToAction("AdminRoles");     } 

Entinedo que me manda un error porque no le estoy pasando el ID, que junto con Name son los unicas columnas de mi tabla, quiero saber como puedo auto generar el famoso ID, que a todo esto es un nvarchar(128), tal como pasa como pasa cuando se inserta un user en la tabla [AspNetUsers]

Bizarre email sent from spam email address with contact details of someone I know and a friend of their’s in it

Someone I know (call them Darren Smith) recently received a rather odd email. It was sent to their personal email address, The “From” field had “Darren Smith” as the name in it, but the actual email address was

The text of the email is this:

NameOfDarren'sFriend, Are you free at the moment?  Regards, Darren Smith 

I have no idea what this could be, how whatever this is got the name of the person Darren knows, or how it got Darren’s original email address. Anyone have any insight as to what sort of attack this is, and what steps should be taken now?

Modifying SharePoint alerts to reduce the details in the email

I’m finally getting my organization to use Alerts. Which is great. We are using SharePoint online. I send each team member a daily summary at 7:00 am.
The following are the settings: Change type: All Changes Send Alerts for These Changes: Anything Changes When to Send Alerts: Daily Summary 7:00 am

From the screen shot below, you can see one team member has been working on a file, and every time the file saves, the alert records it, and if they’ve been working on the file all day, there are several lines for each file. The team members have to scroll a long way down in the email to see all the files that have been modified.

Is there a way for information to be displaying with less information so that you don’t have to scroll down in your email so much? enter image description here

SharePoint Online Webhook – how to get deleted file details

I am using a webhook to capture events in a document library. And based on the sample from pnp team i am able to get the change related to a deleted file, but the return object only provides the item ID and nothing else related to the deleted item. No File Path, File type, name, title or deleted by. How can I get these details?

Remove line spacing from ‘Full details’ in workflow email

I have a workflow in SP 2010 that I use to send an email whenever an item is added. I’ve included the ‘Full details’ in the body of the email, however when the email arrives it has massive spacing in between each line.

Looking at the HTML, it seems to be putting a ‘br’ tag at the end of the ‘p’ tags, so effectively getting double line.

Is there a way to remove certain text (in this case ‘br’ tags) from stuff (variable let’s say) in SharePoint Designer workflows?

[ Anthropology ] Open Question : Here is an example showing how lame people are in this dumbass, brain-dead, robot society we live in: A question to ponder is in details?

There is no legitimacy in the Credit Score of a person. Is there anyone who actually pays attention to, and possibly frets over, their credit score? I recently paid off a car 18 months early, and a personal loan 30 months early, both accounts were then ‘closed’ – and my credit score dropped, instead of going up. Definition of illegitimate, right? (Okay, now watch the stupidfucker answers roll on in)