Automattic\WooCommerce\Admin\Marketing

MarketingCampaign::__constructpublicWC 1.0

MarketingCampaign constructor.

Метод класса: MarketingCampaign{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$MarketingCampaign = new MarketingCampaign();
$MarketingCampaign->__construct( $id, $type, $title, $manage_url, ?Price $cost, ?Price $sales );
$id(строка) (обязательный)
The marketing campaign's unique identifier.
$type(MarketingCampaignType) (обязательный)
The marketing campaign type.
$title(строка) (обязательный)
The title of the marketing campaign.
$manage_url(строка) (обязательный)
The URL to the channel's campaign management page.
?Price $cost
.
По умолчанию: null
?Price $sales
.
По умолчанию: null

Код MarketingCampaign::__construct() WC 11.0.0

public function __construct( string $id, MarketingCampaignType $type, string $title, string $manage_url, ?Price $cost = null, ?Price $sales = null ) {
	$this->id         = $id;
	$this->type       = $type;
	$this->title      = $title;
	$this->manage_url = $manage_url;
	$this->cost       = $cost;
	$this->sales      = $sales;
}