Automattic\WooCommerce\Admin\Marketing
MarketingCampaign::__construct()
MarketingCampaign constructor.
Method of the class: MarketingCampaign{}
No Hooks.
Return
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() MarketingCampaign:: construct code WC 9.7.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; }