This code adds a filter to the WooCommerce email attachments, to attach the post field ID when the ‘customer_completed_order’ email is sent. It checks if the email type is ‘customer_completed_order’, if so, it attaches the post field ID and then returns the attachments. This code ensures that customers receive the post field ID when they complete an order.
Was this code snippet helpful?
YesNo