MarketingCampaign::__construct()publicWC 1.0

MarketingCampaign constructor.

Method of the class: MarketingCampaign{}

No Hooks.


null. Nothing.


$MarketingCampaign = new MarketingCampaign();
$MarketingCampaign->__construct( $id, $type, $title, $manage_url, $cost );
$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.
The cost of the marketing campaign with the currency.
Default: null

MarketingCampaign::__construct() code WC 7.5.1

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