Use payment tokens instead of tokens
This commit is contained in:
parent
d8d2f03a50
commit
8782be0b02
|
@ -344,13 +344,9 @@ class WC_Privacy_Erasers {
|
||||||
foreach ( $tokens as $token ) {
|
foreach ( $tokens as $token ) {
|
||||||
WC_Payment_Tokens::delete( $token->get_id() );
|
WC_Payment_Tokens::delete( $token->get_id() );
|
||||||
|
|
||||||
$erased = apply_filters( 'woocommerce_privacy_erase_customer_token', true, $token );
|
/* Translators: %s Prop name. */
|
||||||
|
$response['messages'][] = sprintf( __( 'Removed payment token "%d"', 'woocommerce' ), $token->get_id() );
|
||||||
if ( $erased ) {
|
$response['items_removed'] = true;
|
||||||
/* Translators: %s Prop name. */
|
|
||||||
$response['messages'][] = sprintf( __( 'Removed token "%d"', 'woocommerce' ), $token->get_id() );
|
|
||||||
$response['items_removed'] = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -378,7 +378,7 @@ class WC_Privacy_Exporters {
|
||||||
foreach ( $tokens as $token ) {
|
foreach ( $tokens as $token ) {
|
||||||
$data_to_export[] = array(
|
$data_to_export[] = array(
|
||||||
'group_id' => 'woocommerce_tokens',
|
'group_id' => 'woocommerce_tokens',
|
||||||
'group_label' => __( 'Tokens', 'woocommerce' ),
|
'group_label' => __( 'Payment Tokens', 'woocommerce' ),
|
||||||
'item_id' => 'token-' . $token->get_id(),
|
'item_id' => 'token-' . $token->get_id(),
|
||||||
'data' => json_encode( $token->get_data() ),
|
'data' => json_encode( $token->get_data() ),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue