Automattic\WooCommerce\Admin\Marketing

MarketingCampaign::__construct()publicWC 1.0

MarketingCampaign constructor.

Method of the class: MarketingCampaign{}

No Hooks.

Return

null. Nothing (null).

Usage

$MarketingCampaign = new MarketingCampaign();
$MarketingCampaign->__construct( $id, $type, $title, $manage_url, $cost, $sales );
$id(string) (required)
The marketing campaign's unique identifier.
$type(MarketingCampaignType) (required)
The marketing campaign type.
$title(string) (required)
The title of the marketing campaign.
$manage_url(string) (required)
The URL to the channel's campaign management page.
$cost(Price|null)
The cost of the marketing campaign with the currency.
Default: null
$sales(Price|null)
The sales of the marketing campaign with the currency.
Default: null

MarketingCampaign::__construct() code WC 8.6.1

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;
}