WC_Privacy::register_erasers_exporters()publicWC 1.0

Initial registration of privacy erasers and exporters.

Due to the use of translation functions, this should run only after plugins loaded.

Method of the class: WC_Privacy{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Privacy = new WC_Privacy();
$WC_Privacy->register_erasers_exporters();

WC_Privacy::register_erasers_exporters() code WC 9.4.2

public function register_erasers_exporters() {
	$this->name = __( 'WooCommerce', 'woocommerce' );

	if ( ! self::$background_process ) {
		self::$background_process = new WC_Privacy_Background_Process();
	}

	// Include supporting classes.
	include_once __DIR__ . '/class-wc-privacy-erasers.php';
	include_once __DIR__ . '/class-wc-privacy-exporters.php';

	// This hook registers WooCommerce data exporters.
	$this->add_exporter( 'woocommerce-customer-data', __( 'WooCommerce Customer Data', 'woocommerce' ), array( 'WC_Privacy_Exporters', 'customer_data_exporter' ) );
	$this->add_exporter( 'woocommerce-customer-orders', __( 'WooCommerce Customer Orders', 'woocommerce' ), array( 'WC_Privacy_Exporters', 'order_data_exporter' ) );
	$this->add_exporter( 'woocommerce-customer-downloads', __( 'WooCommerce Customer Downloads', 'woocommerce' ), array( 'WC_Privacy_Exporters', 'download_data_exporter' ) );
	$this->add_exporter( 'woocommerce-customer-tokens', __( 'WooCommerce Customer Payment Tokens', 'woocommerce' ), array( 'WC_Privacy_Exporters', 'customer_tokens_exporter' ) );

	// This hook registers WooCommerce data erasers.
	$this->add_eraser( 'woocommerce-customer-data', __( 'WooCommerce Customer Data', 'woocommerce' ), array( 'WC_Privacy_Erasers', 'customer_data_eraser' ) );
	$this->add_eraser( 'woocommerce-customer-orders', __( 'WooCommerce Customer Orders', 'woocommerce' ), array( 'WC_Privacy_Erasers', 'order_data_eraser' ) );
	$this->add_eraser( 'woocommerce-customer-downloads', __( 'WooCommerce Customer Downloads', 'woocommerce' ), array( 'WC_Privacy_Erasers', 'download_data_eraser' ) );
	$this->add_eraser( 'woocommerce-customer-tokens', __( 'WooCommerce Customer Payment Tokens', 'woocommerce' ), array( 'WC_Privacy_Erasers', 'customer_tokens_eraser' ) );
}