Change subject in mail order product
-
Hi!
I would like to change the subject in the mail order of a product. This is the default: [{site_title}] Nuevo pedido #({order_number}) and I would like to change it to the name of the product (I have different products) and the name of the client. How can I do that please?
Thank you very much in advance for your support.
BRThe page I need help with: [log in to see the link]
-
Hello @eduiglesias23,
We provide a snippet on our Codex documentation to change the email subject line and add the customer name to it:
https://woocommerce.com/document/change-email-subject-lines/
If you also want to add the product name to the email subject you’d want to slightly modify the snippet. There is a Stack Overflow thread that explains how to do it:
I hope this helps!
I think I am not explaining myself properly, I would like to say that how can I configure that when I write for example [{product_name}] in the email appears the product name which is related to the order. How can I configure this please?
Let me know if I explained now properly…
Thank you so much for your help.
Based on your responses, you want to modify the default email template. kindly correct me if I’m wrong.
Since it’s a customization request, the steps required were the ones suggested by @rainfallnixfig. Kindly follow the steps @rainfallnixfig provided.
Meanwhile, you can also use this plugin to modify your WooCommerce emails
Hi Oyadeyi, thank you for your support.
I guess we are talking about different things, let me explain it with an example:
Now when I receive an order, I receive an email with the subject:
” [{product_name}] Nuevo pedido #(2420) ”What I want is where it is stated [{product_name}] it can appear the name of the real product, for example:
” Course number 1 Nuevo pedido #(2420) ”
What I want is to substitute the name of the product and not to appear the default [{product_name}].
Let me know if is it understandable ??
Thank you very much for your support.- This reply was modified 2 years, 11 months ago by eduiglesias23.
Thanks for clarifying. I believe I understand the point correctly now. The issue is about the variable
{product_name}
not getting replaced by the actualvalue
(the product name).I tried visiting your site but the link above is leading to this error message:
An incorrect login request to your CMS has been detected that we have blocked for security. In order for us to review it, open a ticket to the Support Department with the following ID and IP address: …
So that we can take a closer look, could you please share a copy of your site’s System Status?
You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
Exact! Thank you so much for your support.
Here it is:### WordPress Environment ### WordPress address (URL): https://eduiglesias.net Site address (URL): https://eduiglesias.net WC Version: 5.9.0 REST API Version: ? 5.9.0 WC Blocks Version: ? 6.1.0 Action Scheduler Version: ? 3.3.0 WC Admin Version: ? 2.8.0 Log Directory Writable: ? WP Version: 5.8.2 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ? Language: es_ES External object cache: – ### Server Environment ### Server Info: LiteSpeed PHP Version: 7.3.33 PHP Post Max Size: 128 MB PHP Time Limit: 30 PHP Max Input Vars: 10000 cURL Version: 7.71.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.5.5-10.3.32-MariaDB Max Upload Size: 128 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 5.9.0 WC Database Prefix: wp_ Tama?o total de la base de datos: 177.39MB Tama?o de los datos de la base de datos: 172.07MB Tama?o del índice de la base de datos: 5.32MB wp_woocommerce_sessions: Datos: 0.06MB + índice: 0.02MB + Motor InnoDB wp_woocommerce_api_keys: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_woocommerce_attribute_taxonomies: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_woocommerce_downloadable_product_permissions: Datos: 0.02MB + índice: 0.06MB + Motor InnoDB wp_woocommerce_order_items: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_woocommerce_order_itemmeta: Datos: 0.05MB + índice: 0.03MB + Motor InnoDB wp_woocommerce_tax_rates: Datos: 0.02MB + índice: 0.06MB + Motor InnoDB wp_woocommerce_tax_rate_locations: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_woocommerce_shipping_zones: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_woocommerce_shipping_zone_locations: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_woocommerce_shipping_zone_methods: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_woocommerce_payment_tokens: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_woocommerce_payment_tokenmeta: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_woocommerce_log: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_actionscheduler_actions: Datos: 0.38MB + índice: 0.48MB + Motor InnoDB wp_actionscheduler_claims: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_actionscheduler_groups: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_actionscheduler_logs: Datos: 0.23MB + índice: 0.16MB + Motor InnoDB wp_cli_cookie_scan: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_cli_cookie_scan_categories: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_cli_cookie_scan_cookies: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_cli_cookie_scan_url: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_cli_scripts: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_commentmeta: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_comments: Datos: 0.05MB + índice: 0.09MB + Motor InnoDB wp_defender_audit_log: Datos: 0.02MB + índice: 0.08MB + Motor InnoDB wp_defender_email_log: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_defender_lockout: Datos: 0.25MB + índice: 0.30MB + Motor InnoDB wp_defender_lockout_log: Datos: 0.13MB + índice: 0.05MB + Motor InnoDB wp_defender_scan: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_defender_scan_item: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_links: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_mailchimp_carts: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_mailchimp_jobs: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_options: Datos: 3.06MB + índice: 0.08MB + Motor InnoDB wp_postmeta: Datos: 84.52MB + índice: 1.83MB + Motor InnoDB wp_posts: Datos: 81.48MB + índice: 0.38MB + Motor InnoDB wp_snippets: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_stock_log: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_tcb_api_error_log: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_td_fields: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_td_groups: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_termmeta: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_terms: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_term_relationships: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_term_taxonomy: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_tve_leads_contacts: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_tve_leads_contact_download: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_tve_leads_event_log: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_tve_leads_form_summary: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_tve_leads_form_variations: Datos: 0.23MB + índice: 0.06MB + Motor InnoDB wp_tve_leads_group_options: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_tve_leads_saved_group_options: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_tve_leads_split_test: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_tve_leads_split_test_items: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_ulike: Datos: 0.02MB + índice: 0.08MB + Motor InnoDB wp_ulike_activities: Datos: 0.02MB + índice: 0.08MB + Motor InnoDB wp_ulike_comments: Datos: 0.02MB + índice: 0.08MB + Motor InnoDB wp_ulike_forums: Datos: 0.02MB + índice: 0.08MB + Motor InnoDB wp_ulike_meta: Datos: 0.02MB + índice: 0.05MB + Motor InnoDB wp_usermeta: Datos: 0.09MB + índice: 0.06MB + Motor InnoDB wp_users: Datos: 0.02MB + índice: 0.05MB + Motor InnoDB wp_wcpdf_invoice_number: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_wc_admin_notes: Datos: 0.05MB + índice: 0.00MB + Motor InnoDB wp_wc_admin_note_actions: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_wc_category_lookup: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_wc_customer_lookup: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_wc_download_log: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_wc_order_coupon_lookup: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_wc_order_product_lookup: Datos: 0.02MB + índice: 0.06MB + Motor InnoDB wp_wc_order_stats: Datos: 0.02MB + índice: 0.05MB + Motor InnoDB wp_wc_order_tax_lookup: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_wc_product_meta_lookup: Datos: 0.02MB + índice: 0.09MB + Motor InnoDB wp_wc_reserved_stock: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_wc_tax_rate_classes: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_wc_webhooks: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_wfpklist_template_data: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_wpforms_tasks_meta: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_yikes_easy_mc_forms: Datos: 0.02MB + índice: 0.00MB + Motor InnoDB wp_yoast_indexable: Datos: 0.09MB + índice: 0.09MB + Motor InnoDB wp_yoast_indexable_hierarchy: Datos: 0.02MB + índice: 0.05MB + Motor InnoDB wp_yoast_migrations: Datos: 0.02MB + índice: 0.02MB + Motor InnoDB wp_yoast_primary_term: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB wp_yoast_seo_links: Datos: 0.02MB + índice: 0.03MB + Motor InnoDB ### Post Type Counts ### _tcb_form_settings: 3 attachment: 65 br_popups: 1 cookielawinfo: 6 customize_changeset: 2 elementor_library: 29 mc4wp-form: 1 nav_menu_item: 13 oembed_cache: 9 page: 26 post: 1 product: 3 revision: 1705 shop_order: 47 shop_order_refund: 2 tve_form_type: 2 tve_lead_2s_lightbox: 3 tve_lead_group: 3 tve_lead_shortcode: 2 wpforms: 5 yith_popup: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (23) ### Code Snippets: por Code Snippets Pro – 2.14.3 GDPR Cookie Consent: por WebToffee – 2.0.6 Defender: por WPMU DEV – 2.6.5 Elementor Pro: por Elementor.com – 3.0.10 Elementor: por Elementor.com – 3.5.0 GDPR Compliance for Mailchimp: por YIKES Inc. – 1.3.7 Facebook for WooCommerce: por Facebook – 2.6.7 Flexible Checkout Fields: por WP Desk – 3.1.2 Holded integration: por Holded – 2.0.1 Mailchimp for WooCommerce: por Mailchimp – 2.5.4 MC4WP: Mailchimp for WordPress: por ibericode – 4.8.6 Templates Patterns Collection: por ThemeIsle – 1.1.19 UpdraftPlus - Backup/Restore: por UpdraftPlus.Com DavidAnderson – 1.16.66 Woo Additional Terms: por MyPreview – 1.3.4 WooCommerce Stripe Gateway: por WooCommerce – 5.9.0 WooCommerce PayPal Payments: por WooCommerce – 1.6.3 WooCommerce Shipping & Tax: por WooCommerce – 1.25.20 Stock Manager for WooCommerce: por StoreApps – 2.8.3 WooCommerce: por Automattic – 5.9.0 Yoast SEO: por Equipo Yoast – 17.8 WP Super Cache: por Automattic – 1.7.4 WPForms Lite: por WPForms – 1.7.1.2 Easy Forms for MailChimp: por YIKES Inc. – 6.8.5 ### Inactive Plugins (0) ### ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Must Use Plugins (1) ### Elementor Safe Mode: por Elementor.com – 1.0.0 ### Settings ### API Enabled: – Force SSL: ? Currency: EUR (€) Currency Position: right Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Base de la tienda: #1154 - /tienda/ Carrito: ? La página no contiene el shortcode [woocommerce_cart] o el bloque woocommerce/cart. Finalizar compra: #477 - /finalizar-compra/ Mi cuenta: #478 - /mi-cuenta/ Términos y condiciones: #1371 - /condiciones-generales-web/ ### Theme ### Name: Neve Version: 3.1.1 Author URL: https://themeisle.com Child Theme: ? – Si estás modificando WooCommerce en un tema padre que no has creado personalmente te recomendamos utilizar un tema hijo. Ver: Cómo crear un tema hijo WooCommerce Support: ? ### Templates ### Overrides: neve/woocommerce/product-searchform.php ### WooCommerce PayPal Payments ### Onboarded: ? Shop country code: ES WooCommerce currency supported: ? PayPal card processing available in country: ? Pay Later messaging available in country: – Webhook status: – Vault enabled: ? Logging enabled: – Reference Transactions: – Used PayPal Checkout plugin: – ### Action Scheduler ### Completo: 1.128 Oldest: 2021-11-13 20:57:05 +0100 Newest: 2021-12-14 17:50:14 +0100 Pendiente: 6 Oldest: 2021-12-15 14:36:13 +0100 Newest: 2021-12-17 19:32:32 +0100 ### Status report information ### Generated at: 2021-12-14 18:23:51 +01:00
Hi @eduiglesias23,
Thanks for sending over your system status.
What I want is where it is stated [{product_name}] it can appear the name of the real product
Do you have a custom PHP snippet to show the product name? Please note that adding just the placeholder
[{product_name}]
to the email subject won’t show the product name.This would require custom development and I’ve already shared with you a link that explains how to accomplish it. Here are some more useful tutorials:
– https://coderedirect.com/questions/416993/add-the-product-name-to-the-email-subject-in-woocommerce
– https://ostack.cn/?qa=1136370/
– https://stackoverflow.com/questions/55570847/add-a-custom-placeholder-to-email-subject-in-woocommerce/55571932#55571932If you do require more help with the actual coding, we’d recommend hiring a developer or one of the customization experts listed at https://woocommerce.com/customizations/.
Thanks.
- The topic ‘Change subject in mail order product’ is closed to new replies.