Action hook 'wp_privacy_personal_data_export_file_created'

in WP Core File wp-admin/includes/privacy-tools.php at line 563

View Source

wp_privacy_personal_data_export_file_created

Action Hook
Description
Fires right after all personal data has been written to the export file.

Hook Information

File Location wp-admin/includes/privacy-tools.php View on GitHub
Hook Type Action
Line Number 563

Hook Parameters

Type Name Description
string $archive_pathname The full path to the export file on the filesystem.
string $archive_url The URL of the archive file.
string $html_report_pathname The full path to the HTML personal data report on the filesystem.
int $request_id The export request ID.
string $json_report_pathname The full path to the JSON personal data report on the filesystem.

Usage Examples

Basic Usage
<?php
// Hook into wp_privacy_personal_data_export_file_created
add_action('wp_privacy_personal_data_export_file_created', 'my_custom_function', 10, 5);

function my_custom_function($archive_pathname, $archive_url, $html_report_pathname, $request_id, $json_report_pathname) {
    // Your custom code here
}

Source Code Context

wp-admin/includes/privacy-tools.php:563 - How this hook is used in WordPress core
<?php
 558  			 * @param string $archive_url          The URL of the archive file.
 559  			 * @param string $html_report_pathname The full path to the HTML personal data report on the filesystem.
 560  			 * @param int    $request_id           The export request ID.
 561  			 * @param string $json_report_pathname The full path to the JSON personal data report on the filesystem.
 562  			 */
 563  			do_action( 'wp_privacy_personal_data_export_file_created', $archive_pathname, $archive_url, $html_report_pathname, $request_id, $json_report_pathname );
 564  		}
 565  	} else {
 566  		$error = __( 'Unable to open personal data export file (archive) for writing.' );
 567  	}
 568  

PHP Documentation

<?php
/**
			 * Fires right after all personal data has been written to the export file.
			 *
			 * @since 4.9.6
			 * @since 5.4.0 Added the `$json_report_pathname` parameter.
			 *
			 * @param string $archive_pathname     The full path to the export file on the filesystem.
			 * @param string $archive_url          The URL of the archive file.
			 * @param string $html_report_pathname The full path to the HTML personal data report on the filesystem.
			 * @param int    $request_id           The export request ID.
			 * @param string $json_report_pathname The full path to the JSON personal data report on the filesystem.
			 */
Quick Info
  • Hook Type: Action
  • Parameters: 5
  • File: wp-admin/includes/privacy-tools.php
Related Hooks

Related hooks will be displayed here in future updates.