Automattic\WooCommerce\Admin\Marketing

MarketingCampaignType{}WC .

MarketingCampaignType class

Хуков нет.

Использование

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

Методы

  1. public __construct( string $id, MarketingChannelInterface $channel, string $name, string $description, string $create_url, string $icon_url )
  2. public get_channel()
  3. public get_create_url()
  4. public get_description()
  5. public get_icon_url()
  6. public get_id()
  7. public get_name()

Список изменений

С версии . Введена.
Since x.x.x

Код MarketingCampaignType{} WC 8.7.0

class MarketingCampaignType {
	/**
	 * The unique identifier.
	 *
	 * @var string
	 */
	protected $id;

	/**
	 * The marketing channel that this campaign type belongs to.
	 *
	 * @var MarketingChannelInterface
	 */
	protected $channel;

	/**
	 * Name of the marketing campaign type.
	 *
	 * @var string
	 */
	protected $name;

	/**
	 * Description of the marketing campaign type.
	 *
	 * @var string
	 */
	protected $description;

	/**
	 * The URL to the create campaign page.
	 *
	 * @var string
	 */
	protected $create_url;

	/**
	 * The URL to an image/icon for the campaign type.
	 *
	 * @var string
	 */
	protected $icon_url;

	/**
	 * MarketingCampaignType constructor.
	 *
	 * @param string                    $id          A unique identifier for the campaign type.
	 * @param MarketingChannelInterface $channel     The marketing channel that this campaign type belongs to.
	 * @param string                    $name        Name of the marketing campaign type.
	 * @param string                    $description Description of the marketing campaign type.
	 * @param string                    $create_url  The URL to the create campaign page.
	 * @param string                    $icon_url    The URL to an image/icon for the campaign type.
	 */
	public function __construct( string $id, MarketingChannelInterface $channel, string $name, string $description, string $create_url, string $icon_url ) {
		$this->id          = $id;
		$this->channel     = $channel;
		$this->name        = $name;
		$this->description = $description;
		$this->create_url  = $create_url;
		$this->icon_url    = $icon_url;
	}

	/**
	 * Returns the marketing campaign's unique identifier.
	 *
	 * @return string
	 */
	public function get_id(): string {
		return $this->id;
	}

	/**
	 * Returns the marketing channel that this campaign type belongs to.
	 *
	 * @return MarketingChannelInterface
	 */
	public function get_channel(): MarketingChannelInterface {
		return $this->channel;
	}

	/**
	 * Returns the name of the marketing campaign type.
	 *
	 * @return string
	 */
	public function get_name(): string {
		return $this->name;
	}

	/**
	 * Returns the description of the marketing campaign type.
	 *
	 * @return string
	 */
	public function get_description(): string {
		return $this->description;
	}

	/**
	 * Returns the URL to the create campaign page.
	 *
	 * @return string
	 */
	public function get_create_url(): string {
		return $this->create_url;
	}

	/**
	 * Returns the URL to an image/icon for the campaign type.
	 *
	 * @return string
	 */
	public function get_icon_url(): string {
		return $this->icon_url;
	}
}