WooCommerce Code Reference

MarketingCampaign
in package

MarketingCampaign class

Tags
since

x.x.x

Table of Contents

$cost  : Price
The cost of the marketing campaign with the currency.
$id  : string
The unique identifier.
$manage_url  : string
The URL to the channel's campaign management page.
$sales  : Price
The sales of the marketing campaign with the currency.
$title  : string
Title of the marketing campaign.
$type  : MarketingCampaignType
The marketing campaign type.
__construct()  : mixed
MarketingCampaign constructor.
get_cost()  : Price|null
Returns the cost of the marketing campaign with the currency.
get_id()  : string
Returns the marketing campaign's unique identifier.
get_manage_url()  : string
Returns the URL to manage the marketing campaign.
get_sales()  : Price|null
Returns the sales of the marketing campaign with the currency.
get_title()  : string
Returns the title of the marketing campaign.
get_type()  : MarketingCampaignType
Returns the marketing campaign type.

Properties

Methods

__construct()

MarketingCampaign constructor.

public __construct(string $id, MarketingCampaignType $type, string $title, string $manage_url[, Price|null $cost = null ][, Price|null $sales = null ]) : mixed
Parameters
$id : string

The marketing campaign's unique identifier.

$type : MarketingCampaignType

The marketing campaign type.

$title : string

The title of the marketing campaign.

$manage_url : string

The URL to the channel's campaign management page.

$cost : Price|null = null

The cost of the marketing campaign with the currency.

$sales : Price|null = null

The sales of the marketing campaign with the currency.

Return values
mixed