WordPress at a glance
function is not described


ReportCSVEmail::trigger() public WC 1.0

Trigger the sending of this email.

{} It's a method of the class: ReportCSVEmail{}

No Hooks.


null. Nothing.


$ReportCSVEmail = new ReportCSVEmail();
$ReportCSVEmail->trigger( $user_id, $report_type, $download_url );
$user_id(int) (required)
User ID to email.
$report_type(string) (required)
The type of report export being emailed.
$download_url(string) (required)
The URL for downloading the report.

Code of ReportCSVEmail::trigger() WC 5.3.0

public function trigger( $user_id, $report_type, $download_url ) {
	$user               = new \WP_User( $user_id );
	$this->recipient    = $user->user_email;
	$this->download_url = $download_url;

	if ( isset( $this->report_labels[ $report_type ] ) ) {
		$this->report_type                   = $this->report_labels[ $report_type ];
		$this->placeholders['{report_name}'] = $this->report_type;