WC_Privacy::__construct()publicWC 1.0

Init - hook into events.

Method of the class: WC_Privacy{}

No Hooks.


null. Nothing (null).


$WC_Privacy = new WC_Privacy();

WC_Privacy::__construct() code WC 8.9.0

public function __construct() {

	// Initialize data exporters and erasers.
	add_action( 'plugins_loaded', array( $this, 'register_erasers_exporters' ) );

	// Cleanup orders daily - this is a callback on a daily cron event.
	add_action( 'woocommerce_cleanup_personal_data', array( $this, 'queue_cleanup_personal_data' ) );

	// Handles custom anonymization types not included in core.
	add_filter( 'wp_privacy_anonymize_data', array( $this, 'anonymize_custom_data_types' ), 10, 3 );

	// When this is fired, data is removed in a given order. Called from bulk actions.
	add_action( 'woocommerce_remove_order_personal_data', array( 'WC_Privacy_Erasers', 'remove_order_personal_data' ) );