mailpoet
/
lib
/
EmailEditor
/
Integrations
/
MailPoet
/
Patterns
/
Library
/
AbandonedCartPattern.php
AbandonedCartPattern.php
4 months ago
AbandonedCartReminderPattern.php
1 month ago
AbandonedCartWithDiscountPattern.php
1 month ago
AbstractAbandonedCartPattern.php
5 months ago
AskForReviewPostPurchasePattern.php
1 month ago
BirthdayEmailPattern.php
1 month ago
BookingAutomationEmailPattern.php
1 month ago
CategoryPurchaseFollowUpPattern.php
1 month ago
EducationalCampaignPattern.php
1 month ago
EventInvitationPattern.php
3 months ago
FirstPurchaseThankYouPattern.php
1 month ago
NewArrivalsAnnouncementPattern.php
3 months ago
NewProductsAnnouncementPattern.php
3 months ago
NewsletterPattern.php
4 months ago
PostPurchaseThankYouPattern.php
1 month ago
ProductPurchaseFollowUpPattern.php
1 month ago
ProductRestockNotificationPattern.php
5 months ago
SaleAnnouncementPattern.php
3 months ago
SubscriptionAutomationEmailPattern.php
1 month ago
TagPurchaseFollowUpPattern.php
1 month ago
WelcomeEmailPattern.php
1 month ago
WelcomeWithDiscountEmailPattern.php
1 month ago
WinBackCustomerPattern.php
1 month ago
index.php
1 year ago
AbandonedCartPattern.php
45 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\EmailEditor\Integrations\MailPoet\Patterns\Library; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | /** |
| 9 | * Abandoned cart email pattern for cart recovery. |
| 10 | */ |
| 11 | class AbandonedCartPattern extends AbstractAbandonedCartPattern { |
| 12 | protected $name = 'abandoned-cart-content'; |
| 13 | |
| 14 | protected function get_content(): string { // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
| 15 | return $this->buildContent($this->getProductPlaceholderBlocks(['newsletter.jpg'])); |
| 16 | } |
| 17 | |
| 18 | public function get_email_content(): string { // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
| 19 | return $this->buildContent($this->getProductCollectionBlock()); |
| 20 | } |
| 21 | |
| 22 | private function buildContent(string $productSection): string { |
| 23 | return ' |
| 24 | <!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40"}}},"layout":{"type":"constrained"}} --> |
| 25 | <div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"> |
| 26 | <!-- wp:heading {"level":1} --> |
| 27 | <h1 class="wp-block-heading ">' . __('Don‘t let this gem slip away', 'mailpoet') . '</h1> |
| 28 | <!-- /wp:heading --> |
| 29 | |
| 30 | <!-- wp:paragraph --> |
| 31 | <p>' . __('You’ve already done the hard part: finding something great. Now’s the time to make it yours.', 'mailpoet') . '</p> |
| 32 | <!-- /wp:paragraph --> |
| 33 | |
| 34 | ' . $productSection . ' |
| 35 | </div> |
| 36 | <!-- /wp:group --> |
| 37 | '; |
| 38 | } |
| 39 | |
| 40 | protected function get_title(): string { // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
| 41 | /* translators: Name of a content pattern used as starting content of an email */ |
| 42 | return __('Abandoned Cart', 'mailpoet'); |
| 43 | } |
| 44 | } |
| 45 |