Simple Card *

Default card with white background

* [/card] * * [card type="success"] *

Success Card

*

Green-themed card for positive messages

* [/card] * * [card type="hero"] *

Hero Card

*

Large header card with gradient background

* [/card] * * Button Syntax: *

View Order

*

View Order

* * * @package WooNooW * @subpackage Email */ namespace WooNooW\Email; class DefaultTemplates { /** * Get all default templates organized by recipient and event * * @return array Associative array of templates */ public static function get_all_templates() { $templates = [ 'customer' => [ 'order_placed' => self::customer_order_placed(), 'order_pending' => self::customer_order_pending(), 'order_on_hold' => self::customer_order_on_hold(), 'payment_received' => self::customer_payment_received(), 'payment_failed' => self::customer_payment_failed(), 'order_processing' => self::customer_order_processing(), 'order_shipped' => self::customer_order_shipped(), 'order_completed' => self::customer_order_completed(), 'order_failed' => self::customer_order_failed(), 'order_cancelled' => self::customer_order_cancelled(), 'order_refunded' => self::customer_order_refunded(), 'new_customer' => self::customer_new_customer(), 'newsletter_campaign' => self::customer_newsletter_campaign(), ], 'staff' => [ 'order_placed' => self::staff_order_placed(), 'order_pending' => self::staff_order_pending(), 'order_on_hold' => self::staff_order_on_hold(), 'payment_received' => self::staff_payment_received(), 'payment_failed' => self::staff_payment_failed(), 'order_processing' => self::staff_order_processing(), 'order_shipped' => self::staff_order_shipped(), 'order_completed' => self::staff_order_completed(), 'order_failed' => self::staff_order_failed(), 'order_cancelled' => self::staff_order_cancelled(), 'order_refunded' => self::staff_order_refunded(), ], ]; /** * Filter: woonoow_email_default_templates * * Allows plugins to add or modify default email templates * * @param array $templates Templates organized by recipient type and event */ return apply_filters('woonoow_email_default_templates', $templates); } /** * Get default subject for a specific template * * @param string $recipient 'customer' or 'staff' * @param string $event Event type * @return string Default subject line */ public static function get_default_subject($recipient, $event) { $subjects = [ 'customer' => [ 'order_placed' => 'Order confirmed: #{order_number} ๐Ÿ“ฆ', 'order_pending' => 'We\'re processing your order #{order_number}', 'order_on_hold' => 'Action needed: Complete payment for #{order_number}', 'payment_received' => 'โœ“ Payment received for order #{order_number}', 'payment_failed' => 'Payment didn\'t go through - Help needed for #{order_number}', 'order_processing' => 'Great news! Your order #{order_number} is being prepared ๐ŸŽ‰', 'order_shipped' => 'Your package is on its way! ๐Ÿ“ฎ Order #{order_number}', 'order_completed' => 'Your order #{order_number} has arrived - We\'d love your feedback!', 'order_failed' => 'Issue with order #{order_number} - We\'re here to help', 'order_cancelled' => 'Order #{order_number} has been cancelled', 'order_refunded' => 'Refund processed for order #{order_number}', 'new_customer' => 'Welcome to {site_name}! ๐ŸŽ Exclusive offer inside', 'newsletter_campaign' => '{campaign_title}', ], 'staff' => [ 'order_placed' => '[NEW ORDER] #{order_number} - ${order_total} from {customer_name}', 'order_pending' => '[PENDING] #{order_number} - Awaiting payment confirmation', 'order_on_hold' => '[ON HOLD] #{order_number} - {customer_name} needs to complete payment', 'payment_received' => '[PAYMENT RECEIVED] #{order_number} - ${order_total} - Ready to process', 'payment_failed' => '[PAYMENT FAILED] #{order_number} - {customer_name} - Action required', 'order_processing' => '[READY TO SHIP] #{order_number} - Begin fulfillment', 'order_shipped' => '[SHIPPED] #{order_number} - Tracking: {tracking_number}', 'order_completed' => '[COMPLETED] #{order_number} - Customer received delivery', 'order_failed' => '[FAILED] #{order_number} - Unable to process', 'order_cancelled' => '[CANCELLED] #{order_number} - Refund may be required', 'order_refunded' => '[REFUNDED] #{order_number} - ${order_total} refunded to customer', ], ]; $subject = $subjects[$recipient][$event] ?? ''; /** * Filter: woonoow_email_default_subject * * Allows plugins to modify default email subjects * * @param string $subject Default subject line * @param string $recipient Recipient type ('customer' or 'staff') * @param string $event Event ID */ return apply_filters('woonoow_email_default_subject', $subject, $recipient, $event); } // ======================================================================== // CUSTOMER TEMPLATES // ======================================================================== /** * Customer: New Customer * Sent when customer creates an account */ private static function customer_new_customer() { return '[card type="hero"] ## Welcome to {site_name}, {customer_name}! ๐ŸŽ‰ Your account is ready. Here\'s what you can do now: [/card] [card] **Your Account Benefits:** โœ“ Track orders in real-time with live updates โœ“ Save your favorite items for later โœ“ Faster checkout on future purchases โœ“ Exclusive member deals and early access โœ“ Easy returns and refunds [/card] [card type="warning"] **Important:** Please set your password to access your account: [button url="{set_password_url}" style="solid"]Set Your Password[/button] This link expires in 24 hours. If expired, use "Forgot Password?" on the login page. [/card] [button url="{shop_url}" style="outline"]Start Shopping[/button] [card type="basic"] Got questions? Our customer service team is ready to help: {support_email} [/card]'; } /** * Customer: Newsletter Campaign * Master design template for newsletter campaigns * The {content} variable is replaced with the actual campaign content */ private static function customer_newsletter_campaign() { return '[card type="hero"] ## {campaign_title} [/card] [card] {content} [/card] [card type="basic" bg="#f5f5f5"] You are receiving this because you subscribed to {site_name} newsletter. [Unsubscribe]({unsubscribe_url}) | [Visit Store]({site_url}) ยฉ {current_year} {site_name}. All rights reserved. [/card]'; } /** * Customer: Order Placed * Sent immediately when customer places an order */ private static function customer_order_placed() { return '[card type="hero"] ## Thank you for your order, {customer_name}! ๐ŸŽŠ We\'ve received your order and it\'s now in our system. We\'re working on it right now! [/card] [card] **Order Details:** Order Number: #{order_number} Order Date: {order_date} Order Total: {order_total} [/card] [card] **What You Ordered:** {order_items_table} [/card] [card] **Shipping Address:** {shipping_address} **Payment Method:** {payment_method} [/card] [button url="{order_url}"]View Complete Order[/button] [card type="success"] **What Happens Next?** 1. We\'ll verify your payment (2-4 hours) 2. Our team will prepare and pack your items 3. You\'ll get a shipping notification with tracking info 4. Your package will arrive within 3-7 business days Most orders ship the same business day! [/card] [card type="info"] ๐Ÿ“Œ **Save this email for reference.** You\'ll need your order number {order_number} if you need to contact us. [/card] [card type="basic"] Questions or need to make changes? Reply to this email or contact us at {support_email} [/card]'; } /** * Customer: Order Pending * Sent when order is pending payment confirmation */ private static function customer_order_pending() { return '[card type="info"] ## Your order is pending, {customer_name} We\'ve received your order #{order_number}, and it\'s waiting for payment confirmation. This usually takes just a few minutes. [/card] [card] **Order Summary:** Order Number: #{order_number} Order Total: {order_total} Payment Method: {payment_method} Order Date: {order_date} [/card] [card] **Items:** {order_items_table} [/card] [button url="{order_url}"]Check Order Status[/button] [card type="info"] โฑ๏ธ If you don\'t see a payment confirmation within 30 minutes, don\'t worry! Click the button above to check the status, or your bank may require additional verification. [/card] [card type="basic"] Having payment issues? Contact us at {support_email} and we\'ll help you sort it out quickly. [/card]'; } /** * Customer: Order On-Hold * Sent when order requires customer action */ private static function customer_order_on_hold() { return '[card type="warning"] ## Your order is on hold, {customer_name} Order #{order_number} is waiting for payment confirmation. Complete payment now to get your order processing! [/card] [card] **Order Number:** #{order_number} **Order Total:** {order_total} **Payment Method:** {payment_method} [/card] [button url="{payment_retry_url}"]Complete Payment Now[/button] [card type="info"] **Why is this on hold?** We haven\'t received payment confirmation yet. This is common and easily fixed! **Common reasons:** โ€ข Payment gateway needs more details โ€ข Bank security check required โ€ข Payment was declined temporarily Please try again or contact your bank to authorize this transaction. [/card] [card] **Don\'t lose your items!** Complete payment within 24 hours to keep your order reserved. After that, items may become unavailable. [/card] [card type="basic"] Still having trouble? We\'re here: {support_email} [/card]'; } /** * Customer: Payment Received * Sent when payment is successfully processed */ private static function customer_payment_received() { return '[card type="success"] ## โœ“ Payment confirmed! Great news, {customer_name}! Your payment has been successfully processed. Your order #{order_number} is now confirmed and being prepared for shipment. [/card] [card] **Payment Confirmed:** Amount: {order_total} Transaction ID: {transaction_id} Payment Method: {payment_method} Date: {payment_date} [/card] [card] **What\'s next?** 1. Our warehouse team is picking and packing your items (usually 24 hours) 2. We\'ll generate your shipping label and notify you 3. Your package will ship out soon with tracking info 4. Estimated delivery: 3-7 business days [/card] [button url="{order_url}"]View Your Order[/button] [card type="info"] ๐Ÿšš You\'ll receive a shipping notification with tracking information as soon as your package ships. You can follow your delivery in real-time! [/card] [card type="basic"] Questions? Keep this email handy and contact us: {support_email} [/card]'; } /** * Customer: Payment Failed * Sent when payment processing fails */ private static function customer_payment_failed() { return '[card type="warning"] ## Payment couldn\'t be processed We tried to process your payment for order #{order_number}, but it was declined. Don\'t worryโ€”this is easily fixed, and your order is still reserved! [/card] [card] **Order Details:** Order Number: #{order_number} Order Total: {order_total} Reason: {payment_error_reason} [/card] [button url="{payment_retry_url}"]Update Payment Method[/button] [card type="info"] **Why did this happen?** โ€ข Insufficient funds โ€ข Card expired or blocked โ€ข Incorrect card details โ€ข Bank declined for security reasons โ€ข Wrong billing address **Easy fix:** Try paying with a different card or update your payment method using the button above. [/card] [card] **Your order is still available for 24 hours.** After that, we\'ll need to release your reserved items. **Action needed:** Please update your payment within 24 hours to proceed with your order. [/card] [card type="basic"] Still having issues? Our team can help: {support_email} [/card]'; } /** * Customer: Order Processing * Sent when order payment is confirmed and ready for shipment */ private static function customer_order_processing() { return '[card type="success"] ## ๐ŸŽ‰ Your order is being prepared! Exciting news, {customer_name}! Your payment has been confirmed and order #{order_number} is now being packed and prepared for shipment. [/card] [card] **Order Number:** #{order_number} **Order Total:** {order_total} **Status:** Being Prepared **Estimated Dispatch:** Within 24 hours [/card] [card] **Your Items:** {order_items_table} [/card] [card type="success"] **Order Progress:** โœ“ Payment received โœ“ Order confirmed โณ Being packed and quality checked โณ Generating shipping label โณ Dispatching your package [/card] [card type="info"] ๐Ÿ“ฆ **You\'re almost there!** Your package will ship within 24 hours. Once it does, you\'ll get a notification with tracking info so you can watch your delivery in real-time. [/card] [button url="{order_url}"]Track Your Order[/button] [card type="basic"] Questions about your order? {support_email} [/card]'; } /** * Customer: Order Shipped * Sent when order is dispatched */ private static function customer_order_shipped() { return '[card type="success"] ## ๐Ÿšš Your package is on its way! Your order #{order_number} has shipped! Track your package below and get real-time delivery updates. [/card] [card] **Tracking Information:** Tracking Number: {tracking_number} Carrier: {shipping_carrier} Shipped: {order_date} Estimated Delivery: 3-7 business days [/card] [button url="{tracking_url}"]Track Your Package[/button] [card] **Your Items:** {order_items_table} [/card] [card type="info"] **What to expect:** โ€ข You\'ll see "In Transit" status once the carrier scans it at their facility โ€ข Delivery date may update as the package moves โ€ข You might receive a delivery notification from the carrier โ€ข Contact the carrier directly if the package doesn\'t arrive by the estimated date ๐Ÿ“ **Tip:** Add the tracking number to your phone contacts or set email alerts for delivery updates! [/card] [card type="basic"] Any issues? Contact us: {support_email} [/card]'; } /** * Customer: Order Completed * Sent when order is delivered */ private static function customer_order_completed() { return '[card type="success"] ## ๐Ÿ“ฆ Your order has arrived! Your order #{order_number} has been delivered! We hope you love your purchase. Your feedback helps us provide better service and special offers. [/card] [card] **Order Summary:** Order Number: #{order_number} Delivered: {completion_date} Order Total: {order_total} [/card] [card] **Your Items:** {order_items_table} [/card] [button url="{review_url}"]Share Your Review โญ[/button] [card type="success"] **Why your review matters:** โœ“ Helps other customers make great choices โœ“ Helps us improve our products and service โœ“ Reviewers get exclusive discounts on future purchases! โœ“ You might be featured on our site Leave a review and let us know what you think. Even 2-3 sentences help! [/card] [card type="info"] **Issues with your order?** If anything\'s wrong, damaged, or not what you expected, let us know immediately. We\'ll make it right! [/card] [button url="{return_url}"]Initiate Return or Exchange[/button] [card type="basic"] Thanks for shopping with us! Questions? {support_email} [/card]'; } /** * Customer: Order Failed * Sent when order fails processing */ private static function customer_order_failed() { return '[card type="warning"] ## Issue with order #{order_number} Unfortunately, we weren\'t able to process your order #{order_number}. This sometimes happens due to system issues or inventory problems. [/card] [card] **Order Number:** #{order_number} **Order Total:** {order_total} **Date:** {order_date} [/card] [card type="info"] **What now?** We\'re investigating this issue and our team will contact you shortly with details and next steps. In the meantime, you can: [/card] [button url="{shop_url}"]Browse More Products[/button] [button url="{contact_url}"]Contact Our Team[/button] [card] We apologize for the inconvenience. We\'re here to help make this right! [/card] [card type="basic"] Questions? Contact us immediately: {support_email} [/card]'; } /** * Customer: Order Cancelled * Sent when order is cancelled */ private static function customer_order_cancelled() { return '[card type="warning"] ## Order #{order_number} has been cancelled Your order has been cancelled. Here\'s what you need to know: [/card] [card] **Order Details:** Order Number: #{order_number} Order Total: {order_total} Cancellation Date: {order_date} [/card] [card] **Items That Won\'t Ship:** {order_items_table} [/card] [card type="success"] **Refund Status:** If you made a payment, we\'re processing your refund to your original payment method. This usually takes 5-7 business days, but sometimes longer depending on your bank. [/card] [card type="info"] **Why was this cancelled?** This usually happens because: โ€ข You requested the cancellation โ€ข Payment couldn\'t be confirmed โ€ข Items became out of stock โ€ข You had a payment issue that wasn\'t resolved If this wasn\'t your decision and you\'d like to place a new order, we\'re here to help! [/card] [button url="{shop_url}"]Shop Again[/button] [button url="{contact_url}"]Talk to Us[/button] [card type="basic"] We\'d love to know what we could have done better. Your feedback helps us improve: {support_email} [/card]'; } /** * Customer: Order Refunded * Sent when order is refunded */ private static function customer_order_refunded() { return '[card type="success"] ## โœ“ Your refund has been processed! We\'ve successfully processed a refund of {order_total} for order #{order_number}. [/card] [card] **Refund Details:** Order Number: #{order_number} Refund Amount: {order_total} Refund Date: {order_date} Original Payment Method: {payment_method} [/card] [card type="info"] **When will I see the refund?** โ€ข 5-10 business days: Most refunds appear within this timeframe โ€ข 10-14 business days: Some banks take longer to process โ€ข Check with your bank if it takes longer than 14 days The refund will go back to the original payment method you used. If you paid with a credit card, it may show as a credit on your statement. [/card] [card] **Items Returned:** {order_items_table} [/card] [card type="basic"] Have questions about your refund? {support_email} We hope to serve you again soon! Check out our new arrivals: [/card] [button url="{shop_url}"]Browse New Products[/button]'; } // ======================================================================== // STAFF TEMPLATES // ======================================================================== /** * Staff: Order Placed * Notifies staff when customer places an order */ private static function staff_order_placed() { return '[card type="hero"] ## ๐Ÿ“ฌ New Order Received! A customer has just placed an order. Review the details below and begin processing. [/card] [card] **Customer Information:** Name: {customer_name} Email: {customer_email} Phone: {customer_phone} **Order Details:** Order Number: #{order_number} Order Date: {order_date} Order Total: {order_total} Payment Status: {payment_status} [/card] [card] **Items Ordered:** {order_items_table} [/card] [card] **Shipping Address:** {shipping_address} **Billing Address:** {billing_address} [/card] [card] **Payment Method:** {payment_method} [/card] [button url="{order_url}"]Open Order in Dashboard[/button] [card type="info"] **Next Steps:** โ€ข Verify payment status โ€ข Check inventory availability โ€ข Confirm items are in stock โ€ข Flag any issues for follow-up โ€ข Begin picking items when ready **โš ๏ธ Action Required:** If payment status is not confirmed, follow up with customer or wait for payment gateway to process. [/card] [card type="basic"] Questions or issues? Check the dashboard or contact management. [/card]'; } /** * Staff: Order Pending * Notifies staff of pending orders awaiting payment */ private static function staff_order_pending() { return '[card type="info"] ## โฑ๏ธ Order Pending Payment Order #{order_number} from {customer_name} is awaiting payment confirmation. [/card] [card] **Customer:** {customer_name} **Order Number:** #{order_number} **Order Total:** {order_total} **Payment Method:** {payment_method} **Date Placed:** {order_date} [/card] [card] **Items:** {order_items_table} [/card] [button url="{order_url}"]View in Dashboard[/button] [card type="info"] **Action Items:** โ€ข Monitor payment status โ€ข Prepare items if pre-order or inventory allows โ€ข Contact customer if payment isn\'t received within 24 hours โ€ข Consider automatic cancellation if payment not received after configured timeout [/card]'; } /** * Staff: Order On-Hold * Notifies staff when order requires customer attention */ private static function staff_order_on_hold() { return '[card type="warning"] ## ๐Ÿ”’ Order On-Hold Order #{order_number} from {customer_name} is on hold. Action required from customer. [/card] [card] **Customer:** {customer_name} **Email:** {customer_email} **Order Number:** #{order_number} **Order Total:** {order_total} **Hold Reason:** Awaiting payment confirmation [/card] [button url="{order_url}"]View Order[/button] [card type="info"] **Status:** Waiting for customer to complete payment or resolve issue. **Recommended Actions:** โ€ข Wait 24 hours for customer response โ€ข Send manual follow-up if no response โ€ข Check customer\'s email for payment retry โ€ข Consider auto-cancellation per your policy [/card]'; } /** * Staff: Payment Received * Notifies staff when payment is successfully received */ private static function staff_payment_received() { return '[card type="success"] ## โœ“ Payment Received! Payment successfully processed for order #{order_number}. Order is now ready for fulfillment. [/card] [card] **Payment Details:** Amount: {order_total} Payment Method: {payment_method} Transaction ID: {transaction_id} Date: {payment_date} **Customer:** {customer_name} **Order Number:** #{order_number} [/card] [card] **Items to Prepare:** {order_items_table} [/card] [card type="success"] **Ready to Process:** โœ“ Payment confirmed โœ“ Order in system ๐Ÿ“ฆ Begin picking and packing ๐Ÿท๏ธ Generate shipping label ๐Ÿ“ฎ Prepare for dispatch [/card] [button url="{order_url}"]Start Processing[/button] [card type="info"] Order is now confirmed and ready for fulfillment. Begin preparation immediately to meet dispatch targets. [/card]'; } /** * Staff: Payment Failed * Notifies staff when payment processing fails */ private static function staff_payment_failed() { return '[card type="warning"] ## โš ๏ธ Payment Failed Payment processing failed for order #{order_number}. Order is on hold pending customer action. [/card] [card] **Order Details:** Order Number: #{order_number} Customer: {customer_name} Amount: {order_total} Payment Method: {payment_method} Failed Date: {payment_date} Failure Reason: {payment_error_reason} [/card] [button url="{order_url}"]View Details[/button] [card type="warning"] **Status:** On Hold - Awaiting Payment Retry **Action Items:** 1. Customer has been notified automatically 2. Order is reserved for 24 hours 3. Monitor for payment retry from customer 4. After 24 hours with no payment: auto-cancel per policy or contact customer 5. Do NOT prepare items until payment is confirmed [/card] [card type="info"] **Follow-Up Timeline:** โ€ข 0 hours: Payment fails, customer notified โ€ข 12 hours: Check if customer retried payment โ€ข 24 hours: Reach out to customer if no payment received โ€ข 48 hours: Consider cancellation if no response [/card]'; } /** * Staff: Order Processing * Notifies staff when order is confirmed and ready to process */ private static function staff_order_processing() { return '[card type="success"] ## โœ… Order Confirmed & Ready to Process Order #{order_number} is confirmed. Payment received. Begin preparation and packing immediately. [/card] [card] **Order Details:** Order Number: #{order_number} Customer: {customer_name} Order Total: {order_total} Confirmed Date: {order_date} [/card] [card] **Items to Pick & Pack:** {order_items_table} [/card] [card type="success"] **Fulfillment Checklist:** โ˜ Pick all items from inventory โ˜ Verify quality and condition โ˜ Pack securely with packing material โ˜ Generate shipping label โ˜ Weigh and verify dimensions โ˜ Arrange pickup with carrier โ˜ Update order status to "Shipped" โ˜ Send tracking info to customer [/card] [button url="{order_url}"]Open Full Order[/button] [card type="info"] **Target Dispatch:** Within 24 hours Keep this order moving through fulfillment to maintain on-time delivery. [/card]'; } /** * Staff: Order Shipped * Notifies staff when order is marked as shipped */ private static function staff_order_shipped() { return '[card type="success"] ## ๐Ÿ“ฎ Order Shipped Order #{order_number} has been dispatched. Customer automatically notified with tracking information. [/card] [card] **Order Details:** Order Number: #{order_number} Customer: {customer_name} Tracking Number: {tracking_number} Carrier: {shipping_carrier} Shipped Date: {order_date} [/card] [button url="{order_url}"]View Order[/button] [card type="success"] โœ“ Picked and packed โœ“ Shipping label generated โœ“ Picked up by carrier โœ“ Customer notified with tracking info **Customer can now track their shipment in real-time.** [/card] [card type="info"] Order is in transit. Monitor for any delivery issues or customer inquiries about tracking. [/card]'; } /** * Staff: Order Completed * Notifies staff when order is completed/delivered */ private static function staff_order_completed() { return '[card type="success"] ## โœ… Order Completed Order #{order_number} has been delivered to customer. All fulfillment steps completed successfully. [/card] [card] **Order Summary:** Order Number: #{order_number} Customer: {customer_name} Order Total: {order_total} Completed Date: {order_date} [/card] [card] **Order Journey:** โœ“ Order placed โœ“ Payment received โœ“ Order prepared & packed โœ“ Shipped with tracking โœ“ Delivered to customer [/card] [card type="success"] **Customer Experience:** โœ“ Customer notified โœ“ Invited to leave review โœ“ Offered return option โœ“ Follow-up actions triggered Consider this order a success! [/card] [button url="{order_url}"]View Order Details[/button] [card type="info"] Monitor for customer reviews and feedback. Flag any issues that arise for continuous improvement. [/card]'; } /** * Staff: Order Failed * Notifies staff when order fails */ private static function staff_order_failed() { return '[card type="warning"] ## โŒ Order Failed Order #{order_number} from {customer_name} could not be processed. Immediate action required. [/card] [card] **Order Details:** Order Number: #{order_number} Customer: {customer_name} Order Total: {order_total} Failure Date: {order_date} [/card] [button url="{order_url}"]View Details & Investigate[/button] [card type="warning"] **Immediate Actions Required:** 1. Investigate the failure reason (payment? inventory? system?) 2. Contact customer with explanation and solution 3. Offer alternatives (different payment method, substitute items, etc.) 4. Provide timeline for resolution 5. Process refund if no resolution path found [/card] [card type="info"] This order requires staff attention to resolve and maintain customer satisfaction. [/card]'; } /** * Staff: Order Cancelled * Notifies staff when order is cancelled */ private static function staff_order_cancelled() { return '[card type="warning"] ## โŒ Order Cancelled Order #{order_number} from {customer_name} has been cancelled. Refund processing may be required. [/card] [card] **Order Details:** Order Number: #{order_number} Customer: {customer_name} Order Total: {order_total} Cancelled Date: {order_date} [/card] [card] **Items (Will Not Ship):** {order_items_table} [/card] [card type="warning"] **Action Items:** โ˜ Check if payment was received โ˜ If paid: Process refund to original payment method โ˜ Update inventory for cancelled items โ˜ Check warehouse if order was partially prepared โ˜ Confirm cancellation with customer โ˜ Log cancellation reason for analytics [/card] [card type="info"] **Refund Timeline:** โ€ข Immediate: Process refund in system โ€ข 5-10 days: Customer sees refund in their account โ€ข Communicate expected timeline to customer [/card] [button url="{order_url}"]View & Process Refund[/button] [card type="basic"] Document the cancellation reason for business intelligence. Customer satisfaction is important. [/card]'; } /** * Staff: Order Refunded * Notifies staff when order is refunded */ private static function staff_order_refunded() { return '[card type="success"] ## โœ“ Refund Processed Order #{order_number} has been refunded. Customer automatically notified of refund details. [/card] [card] **Refund Details:** Order Number: #{order_number} Customer: {customer_name} Refund Amount: {order_total} Refund Date: {order_date} [/card] [button url="{order_url}"]View Order[/button] [card type="success"] โœ“ Refund processed to: {payment_method} โœ“ Customer notified with timeline โœ“ Expected to appear: 5-10 business days โœ“ Order status updated [/card] [card type="info"] Customer will see refund in their account within 5-10 business days depending on their bank. Flag if customer inquires about missing refund after 14 days. [/card]'; } }