automatewoo/presets/abandoned-cart-4-hours.php
fei-source 47d3c9a8b6 Update to v6.2.2
Source: GrootMade/Festinger Vault
2026-03-15 08:31:15 +08:00

49 lines
1.2 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$email_content = <<<EMAIL
Hi {{ customer.first_name | fallback: 'there' }},
It looks like you didnt get to finish checking out on {{ shop.url }}, so we saved the items in your cart for you.
<strong>Here's what's waiting for you:</strong>
{{ cart.items }}
<a href="{{ cart.link }}" class="automatewoo-button">Click here to complete your order</a>.
See you soon,
Your friends at {{ shop.title }}
EMAIL;
return [
'title' => 'Abandoned cart (4 hours)',
'description' => 'Trigger a follow up email to the customer in case they have abandoned their cart for more than 4 hours.',
'type' => 'automatic',
'trigger' => [
'name' => 'abandoned_cart_customer',
'options' => [
'user_pause_period' => '1',
],
],
'rules' => [],
'timing' => [
'type' => 'delayed',
'delay' => [
'unit' => 'h',
'value' => 4,
],
],
'actions' => [
[
'name' => 'send_email',
'options' => [
'to' => '{{ customer.email }}',
'subject' => "Still thinking it over, {{ customer.first_name | fallback: 'friend' }}?",
'email_heading' => 'Your cart is waiting for you 🛒',
'preheader' => '',
'template' => 'default',
'email_content' => $email_content,
],
],
],
];