InstalledExtensions.php
2 years ago
MarketingCampaign.php
1 year ago
MarketingCampaignType.php
3 years ago
MarketingChannelInterface.php
3 years ago
MarketingChannels.php
3 years ago
Price.php
3 years ago
MarketingChannelInterface.php
91 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Represents a marketing channel for the multichannel-marketing feature. |
| 4 | * |
| 5 | * This interface will be implemented by third-party extensions to register themselves as marketing channels. |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\WooCommerce\Admin\Marketing; |
| 9 | |
| 10 | /** |
| 11 | * MarketingChannelInterface interface |
| 12 | * |
| 13 | * @since x.x.x |
| 14 | */ |
| 15 | interface MarketingChannelInterface { |
| 16 | public const PRODUCT_LISTINGS_NOT_APPLICABLE = 'not-applicable'; |
| 17 | public const PRODUCT_LISTINGS_SYNC_IN_PROGRESS = 'sync-in-progress'; |
| 18 | public const PRODUCT_LISTINGS_SYNC_FAILED = 'sync-failed'; |
| 19 | public const PRODUCT_LISTINGS_SYNCED = 'synced'; |
| 20 | |
| 21 | /** |
| 22 | * Returns the unique identifier string for the marketing channel extension, also known as the plugin slug. |
| 23 | * |
| 24 | * @return string |
| 25 | */ |
| 26 | public function get_slug(): string; |
| 27 | |
| 28 | /** |
| 29 | * Returns the name of the marketing channel. |
| 30 | * |
| 31 | * @return string |
| 32 | */ |
| 33 | public function get_name(): string; |
| 34 | |
| 35 | /** |
| 36 | * Returns the description of the marketing channel. |
| 37 | * |
| 38 | * @return string |
| 39 | */ |
| 40 | public function get_description(): string; |
| 41 | |
| 42 | /** |
| 43 | * Returns the path to the channel icon. |
| 44 | * |
| 45 | * @return string |
| 46 | */ |
| 47 | public function get_icon_url(): string; |
| 48 | |
| 49 | /** |
| 50 | * Returns the setup status of the marketing channel. |
| 51 | * |
| 52 | * @return bool |
| 53 | */ |
| 54 | public function is_setup_completed(): bool; |
| 55 | |
| 56 | /** |
| 57 | * Returns the URL to the settings page, or the link to complete the setup/onboarding if the channel has not been set up yet. |
| 58 | * |
| 59 | * @return string |
| 60 | */ |
| 61 | public function get_setup_url(): string; |
| 62 | |
| 63 | /** |
| 64 | * Returns the status of the marketing channel's product listings. |
| 65 | * |
| 66 | * @return string |
| 67 | */ |
| 68 | public function get_product_listings_status(): string; |
| 69 | |
| 70 | /** |
| 71 | * Returns the number of channel issues/errors (e.g. account-related errors, product synchronization issues, etc.). |
| 72 | * |
| 73 | * @return int The number of issues to resolve, or 0 if there are no issues with the channel. |
| 74 | */ |
| 75 | public function get_errors_count(): int; |
| 76 | |
| 77 | /** |
| 78 | * Returns an array of marketing campaign types that the channel supports. |
| 79 | * |
| 80 | * @return MarketingCampaignType[] Array of marketing campaign type objects. |
| 81 | */ |
| 82 | public function get_supported_campaign_types(): array; |
| 83 | |
| 84 | /** |
| 85 | * Returns an array of the channel's marketing campaigns. |
| 86 | * |
| 87 | * @return MarketingCampaign[] |
| 88 | */ |
| 89 | public function get_campaigns(): array; |
| 90 | } |
| 91 |