How to use dynamic mail in woocommerce in order receive
Dynamic Mail is a feature in WooCommerce that allows you to send customized emails to customers based on their actions in your store. Here's a step-by-step guide on how to use Dynamic Mail in WooCommerce to receive orders:
Prerequisites:
- You need to have WooCommerce installed and activated on your WordPress website.
- You need to have a valid email address set up in your WordPress website's settings.
Step 1: Enable Dynamic Mail
- Log in to your WordPress dashboard.
- Go to WooCommerce > Settings > Advanced > Email.
- Scroll down to the "Dynamic Mail" section and toggle the switch to "Enable Dynamic Mail" to the "On" position.
Step 2: Configure Order Received Email
- Go to WooCommerce > Settings > Emails > Order Received.
- Click on the "Edit" button next to "Order Received" email.
- In the "Email Template" section, select the "Order Received" template.
- In the "Subject" field, enter a subject for the email (e.g., "Your Order #XXXXX").
- In the "Body" field, you can customize the email content using placeholders (e.g.,
{order_number}
,{order_total}
, etc.). You can also add custom HTML code if needed. - Click "Save Changes" to save the email template.
Step 3: Configure Order Received Email Trigger
- Go to WooCommerce > Settings > Advanced > Email.
- Scroll down to the "Dynamic Mail" section and click on the "Add Trigger" button.
- Select "Order Received" as the trigger type.
- Choose the email template you created in Step 2 as the email template.
- Set the trigger conditions (e.g., "When an order is completed" or "When an order is paid").
- Click "Save Trigger" to save the trigger.
Step 4: Test the Order Received Email
- Place an order on your website to test the email.
- Check your email inbox to see if you receive the Order Received email.
Tips and Variations:
- You can customize the email content using placeholders and conditional statements (e.g.,
{if order_total > 100}
). - You can also use WooCommerce's built-in email templates and modify them to suit your needs.
- You can create multiple email templates and triggers for different scenarios (e.g., order cancellation, order update, etc.).
- You can also use third-party plugins like "WooCommerce Dynamic Mail" to extend the functionality of Dynamic Mail.
By following these steps, you should be able to set up Dynamic Mail in WooCommerce to receive orders and send customized emails to your customers.