mailpoet
/
lib
/
EmailEditor
/
Integrations
/
MailPoet
/
Patterns
/
Library
/
AbstractAbandonedCartPattern.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
AbstractAbandonedCartPattern.php
43 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 | use MailPoet\EmailEditor\Integrations\MailPoet\EmailEditor; |
| 9 | use MailPoet\EmailEditor\Integrations\MailPoet\Patterns\Pattern; |
| 10 | |
| 11 | /** |
| 12 | * Base class for abandoned cart email patterns. |
| 13 | */ |
| 14 | abstract class AbstractAbandonedCartPattern extends Pattern { |
| 15 | protected $block_types = ['core/post-content']; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps |
| 16 | protected $template_types = ['email-template']; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps |
| 17 | protected $categories = ['abandoned-cart']; |
| 18 | protected $post_types = [EmailEditor::MAILPOET_EMAIL_POST_TYPE]; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps |
| 19 | |
| 20 | /** |
| 21 | * Get Product Collection block configured for cart contents. |
| 22 | */ |
| 23 | protected function getProductCollectionBlock(): string { |
| 24 | return ' |
| 25 | <!-- wp:woocommerce/product-collection {"query":{"perPage":10,"pages":1,"offset":0,"postType":"product","order":"asc","orderBy":"title","search":"","exclude":[],"inherit":false,"taxQuery":[],"isProductCollectionBlock":true,"featured":false,"woocommerceOnSale":false,"woocommerceStockStatus":["instock","outofstock","onbackorder"],"woocommerceAttributes":[],"woocommerceHandPickedProducts":[],"filterable":false,"relatedBy":{"categories":true,"tags":true}},"tagName":"div","displayLayout":{"type":"flex","columns":1,"shrinkColumns":true},"dimensions":{"widthType":"fill"},"collection":"woocommerce/product-collection/cart-contents","hideControls":["inherit","attributes","keyword","order","default-order","featured","on-sale","stock-status","hand-picked","taxonomy","filterable","created","price-range"],"queryContextIncludes":["cart"],"__privatePreviewState":{"isPreview":false,"previewMessage":"Actual products will vary depending on the page being viewed."}} --> |
| 26 | <div class="wp-block-woocommerce-product-collection"><!-- wp:woocommerce/product-template --> |
| 27 | <!-- wp:woocommerce/product-image {"showSaleBadge":false,"imageSizing":"thumbnail","isDescendentOfQueryLoop":true,"style":{"spacing":{"padding":{"top":"var:preset|spacing|10","bottom":"var:preset|spacing|10"}}}} --> |
| 28 | <!-- wp:woocommerce/product-sale-badge {"align":"right"} /--> |
| 29 | <!-- /wp:woocommerce/product-image --> |
| 30 | |
| 31 | <!-- wp:post-title {"textAlign":"center","isLink":true,"style":{"spacing":{"padding":{"top":"var:preset|spacing|10","bottom":"var:preset|spacing|10"}},"typography":{"fontSize":"24px"}},"__woocommerceNamespace":"woocommerce/product-collection/product-title"} /--> |
| 32 | |
| 33 | <!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","style":{"typography":{"fontSize":"14px"},"spacing":{"padding":{"top":"var:preset|spacing|10","bottom":"var:preset|spacing|10"}}}} /--> |
| 34 | |
| 35 | <!-- wp:woocommerce/product-button {"textAlign":"center","isDescendentOfQueryLoop":true,"style":{"typography":{"fontSize":"16px"}}} /--> |
| 36 | <!-- /wp:woocommerce/product-template --> |
| 37 | </div> |
| 38 | <!-- /wp:woocommerce/product-collection --> |
| 39 | '; |
| 40 | |
| 41 | } |
| 42 | } |
| 43 |