Automattic\WooCommerce\Admin\Marketing

MarketingCampaign::__constructpublicWC 1.0

MarketingCampaign constructor.

Method of the class: MarketingCampaign{}

No Hooks.

Returns

null. Nothing (null).

Usage

$MarketingCampaign = new MarketingCampaign();
$MarketingCampaign->__construct( $id, $type, $title, $manage_url, ?Price $cost, ?Price $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.
?Price $cost
.
Default: null
?Price $sales
.
Default: null

MarketingCampaign::__construct() code WC 10.5.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;
}