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
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<string|int, mixed>
- This is a list of erasers.
- $export_priority : int
- This is a priority for the wp_privacy_personal_data_exporters filter
- $exporters : array<string|int, mixed>
- This is a list of exporters.
- __construct() : mixed
- WC_Abstract_Privacy Constructor.
- add_eraser() : array<string|int, mixed>
- Add eraser to list of erasers.
- add_exporter() : array<string|int, mixed>
- 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<string|int, mixed>
- Integrate this eraser implementation within the WordPress core erasers.
- register_exporters() : array<string|int, mixed>
- Integrate this exporter implementation within the WordPress core exporters.
- init() : mixed
- Hook in events.
Properties
$name
This is the name of this object type.
public
string
$name
$erase_priority
This is a priority for the wp_privacy_personal_data_erasers filter
protected
int
$erase_priority
$erasers
This is a list of erasers.
protected
array<string|int, mixed>
$erasers
= array()
$export_priority
This is a priority for the wp_privacy_personal_data_exporters filter
protected
int
$export_priority
$exporters
This is a list of exporters.
protected
array<string|int, mixed>
$exporters
= array()
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<string|int, mixed> $callback) : array<string|int, mixed>
Parameters
- $id : string
-
ID of the Eraser.
- $name : string
-
Exporter name.
- $callback : string|array<string|int, mixed>
-
Exporter callback.
Return values
array<string|int, mixed> —add_exporter()
Add exporter to list of exporters.
public
add_exporter(string $id, string $name, string|array<string|int, mixed> $callback) : array<string|int, mixed>
Parameters
- $id : string
-
ID of the Exporter.
- $name : string
-
Exporter name.
- $callback : string|array<string|int, mixed>
-
Exporter callback.
Return values
array<string|int, mixed> —add_privacy_message()
Adds the privacy message on WC privacy page.
public
add_privacy_message() : mixed
Return values
mixed —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<string|int, mixed> $erasers = array() ]) : array<string|int, mixed>
Parameters
- $erasers : array<string|int, mixed> = array()
-
List of eraser callbacks.
Return values
array<string|int, mixed> —register_exporters()
Integrate this exporter implementation within the WordPress core exporters.
public
register_exporters([array<string|int, mixed> $exporters = array() ]) : array<string|int, mixed>
Parameters
- $exporters : array<string|int, mixed> = array()
-
List of exporter callbacks.
Return values
array<string|int, mixed> —init()
Hook in events.
protected
init() : mixed