HEX
Server: LiteSpeed
System: Linux mail.aatilis.ir 6.8.0-101-generic #101-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 9 10:15:05 UTC 2026 x86_64
User: www (1000)
PHP: 8.3.30
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/soqatland.com/wp-content/plugins/woocommerce/src/Admin/Marketing/MarketingCampaign.php
<?php
/**
 * Represents a marketing/ads campaign for marketing channels.
 *
 * Marketing channels (implementing MarketingChannelInterface) can use this class to map their campaign data and present it to WooCommerce core.
 */

namespace Automattic\WooCommerce\Admin\Marketing;

/**
 * MarketingCampaign class
 *
 * @since x.x.x
 */
class MarketingCampaign {
	/**
	 * The unique identifier.
	 *
	 * @var string
	 */
	protected $id;

	/**
	 * The marketing campaign type.
	 *
	 * @var MarketingCampaignType
	 */
	protected $type;

	/**
	 * Title of the marketing campaign.
	 *
	 * @var string
	 */
	protected $title;

	/**
	 * The URL to the channel's campaign management page.
	 *
	 * @var string
	 */
	protected $manage_url;

	/**
	 * The cost of the marketing campaign with the currency.
	 *
	 * @var Price
	 */
	protected $cost;

	/**
	 * The sales of the marketing campaign with the currency.
	 *
	 * @var Price
	 */
	protected $sales;

	/**
	 * MarketingCampaign constructor.
	 *
	 * @param string                $id         The marketing campaign's unique identifier.
	 * @param MarketingCampaignType $type       The marketing campaign type.
	 * @param string                $title      The title of the marketing campaign.
	 * @param string                $manage_url The URL to the channel's campaign management page.
	 * @param Price|null            $cost       The cost of the marketing campaign with the currency.
	 * @param Price|null            $sales      The sales of the marketing campaign with the currency.
	 */
	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;
	}

	/**
	 * Returns the marketing campaign's unique identifier.
	 *
	 * @return string
	 */
	public function get_id(): string {
		return $this->id;
	}

	/**
	 * Returns the marketing campaign type.
	 *
	 * @return MarketingCampaignType
	 */
	public function get_type(): MarketingCampaignType {
		return $this->type;
	}

	/**
	 * Returns the title of the marketing campaign.
	 *
	 * @return string
	 */
	public function get_title(): string {
		return $this->title;
	}

	/**
	 * Returns the URL to manage the marketing campaign.
	 *
	 * @return string
	 */
	public function get_manage_url(): string {
		return $this->manage_url;
	}

	/**
	 * Returns the cost of the marketing campaign with the currency.
	 *
	 * @return Price|null
	 */
	public function get_cost(): ?Price {
		return $this->cost;
	}

	/**
	 * Returns the sales of the marketing campaign with the currency.
	 *
	 * @return Price|null
	 */
	public function get_sales(): ?Price {
		return $this->sales;
	}
}