Automattic\WooCommerce\Admin\Marketing

MarketingCampaign::__construct()publicWC 1.0

MarketingCampaign constructor.

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

Хуков нет.

Возвращает

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

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

$MarketingCampaign = new MarketingCampaign();
$MarketingCampaign->__construct( $id, $type, $title, $manage_url, $cost, $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.
$cost(Price|null)
The cost of the marketing campaign with the currency.
По умолчанию: null
$sales(Price|null)
The sales of the marketing campaign with the currency.
По умолчанию: null

Код MarketingCampaign::__construct() WC 8.7.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;
}