WooCommerce Code Reference

WC_Abstract_Privacy
in package

Abstract class that is intended to be extended by specific privacy class. It handles the display of the privacy message of the privacy id to the admin, privacy data to be exported and privacy data to be deleted.

Tags
version
3.4.0

Table of Contents

$name  : string
This is the name of this object type.
$erase_priority  : int
This is a priority for the wp_privacy_personal_data_erasers filter
$erasers  : array
This is a list of erasers.
$export_priority  : int
This is a priority for the wp_privacy_personal_data_exporters filter
$exporters  : array
This is a list of exporters.
__construct()  : mixed
WC_Abstract_Privacy Constructor.
add_eraser()  : array
Add eraser to list of erasers.
add_exporter()  : array
Add exporter to list of exporters.
add_privacy_message()  : mixed
Adds the privacy message on WC privacy page.
get_privacy_message()  : string
Gets the message of the privacy to display.
register_erasers()  : array
Integrate this eraser implementation within the WordPress core erasers.
register_exporters()  : array
Integrate this exporter implementation within the WordPress core exporters.
init()  : mixed
Hook in events.

Properties

Methods

__construct()

WC_Abstract_Privacy Constructor.

public __construct([string $name = '' ][, int $export_priority = 5 ][, int $erase_priority = 10 ]) : mixed
Parameters
$name : string = ''

Plugin identifier.

$export_priority : int = 5

Export priority.

$erase_priority : int = 10

Erase priority.

Return values
mixed

add_eraser()

Add eraser to list of erasers.

public add_eraser(string $id, string $name, string|array $callback) : array
Parameters
$id : string

ID of the Eraser.

$name : string

Exporter name.

$callback : string|array

Exporter callback.

Return values
array

add_exporter()

Add exporter to list of exporters.

public add_exporter(string $id, string $name, string|array $callback) : array
Parameters
$id : string

ID of the Exporter.

$name : string

Exporter name.

$callback : string|array

Exporter callback.

Return values
array

get_privacy_message()

Gets the message of the privacy to display.

public get_privacy_message() : string

To be overloaded by the implementor.

Return values
string

register_erasers()

Integrate this eraser implementation within the WordPress core erasers.

public register_erasers([array $erasers = array() ]) : array
Parameters
$erasers : array = array()

List of eraser callbacks.

Return values
array

register_exporters()

Integrate this exporter implementation within the WordPress core exporters.

public register_exporters([array $exporters = array() ]) : array
Parameters
$exporters : array = array()

List of exporter callbacks.

Return values
array