LLMS_Admin_Tool_Limited_Billing_Order_Locator::handle()

Generate the CSV file an serve it as a downloadable attachment.


Return Return

(void)


Top ↑

Source Source

File: includes/admin/tools/class-llms-admin-tool-limited-billing-order-locator.php

	protected function handle() {

		$file = $this->get_csv_file();

		if ( ! headers_sent() ) { // This makes the method testable via phpunit.
			header( 'Content-Type: text/csv' );
			header( 'Content-Disposition: attachment; filename=orders.csv' );
			header( 'Content-Length: ' . strlen( $file ) );
			nocache_headers();
		}

		llms_exit( $file );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.