Automattic\WooCommerce\Admin\Marketing

MarketingChannelInterface{}WC .

MarketingChannelInterface interface

No Hooks.

Usage

$MarketingChannelInterface = new MarketingChannelInterface();
// use class methods

Methods

  1. public get_campaigns()
  2. public get_description()
  3. public get_errors_count()
  4. public get_icon_url()
  5. public get_name()
  6. public get_product_listings_status()
  7. public get_setup_url()
  8. public get_slug()
  9. public get_supported_campaign_types()
  10. public is_setup_completed()

Changelog

Since . Introduced.
Since x.x.x

MarketingChannelInterface{} code WC 8.7.0

interface MarketingChannelInterface {
	public const PRODUCT_LISTINGS_NOT_APPLICABLE   = 'not-applicable';
	public const PRODUCT_LISTINGS_SYNC_IN_PROGRESS = 'sync-in-progress';
	public const PRODUCT_LISTINGS_SYNC_FAILED      = 'sync-failed';
	public const PRODUCT_LISTINGS_SYNCED           = 'synced';

	/**
	 * Returns the unique identifier string for the marketing channel extension, also known as the plugin slug.
	 *
	 * @return string
	 */
	public function get_slug(): string;

	/**
	 * Returns the name of the marketing channel.
	 *
	 * @return string
	 */
	public function get_name(): string;

	/**
	 * Returns the description of the marketing channel.
	 *
	 * @return string
	 */
	public function get_description(): string;

	/**
	 * Returns the path to the channel icon.
	 *
	 * @return string
	 */
	public function get_icon_url(): string;

	/**
	 * Returns the setup status of the marketing channel.
	 *
	 * @return bool
	 */
	public function is_setup_completed(): bool;

	/**
	 * Returns the URL to the settings page, or the link to complete the setup/onboarding if the channel has not been set up yet.
	 *
	 * @return string
	 */
	public function get_setup_url(): string;

	/**
	 * Returns the status of the marketing channel's product listings.
	 *
	 * @return string
	 */
	public function get_product_listings_status(): string;

	/**
	 * Returns the number of channel issues/errors (e.g. account-related errors, product synchronization issues, etc.).
	 *
	 * @return int The number of issues to resolve, or 0 if there are no issues with the channel.
	 */
	public function get_errors_count(): int;

	/**
	 * Returns an array of marketing campaign types that the channel supports.
	 *
	 * @return MarketingCampaignType[] Array of marketing campaign type objects.
	 */
	public function get_supported_campaign_types(): array;

	/**
	 * Returns an array of the channel's marketing campaigns.
	 *
	 * @return MarketingCampaign[]
	 */
	public function get_campaigns(): array;
}