woocommerce_privacy_remove_order_personal_data_prop_value
Expose a way to control the anonymized value of a prop via 3rd party code.
Usage
add_filter( 'woocommerce_privacy_remove_order_personal_data_prop_value', 'wp_kama_woocommerce_privacy_remove_order_personal_data_prop_value_filter', 10, 5 ); /** * Function for `woocommerce_privacy_remove_order_personal_data_prop_value` filter-hook. * * @param string $anon_value Value of this prop after anonymization. * @param string $prop Name of the prop being removed. * @param string $value Current value of the data. * @param string $data_type Type of data. * @param WC_Order $order An order object. * * @return string */ function wp_kama_woocommerce_privacy_remove_order_personal_data_prop_value_filter( $anon_value, $prop, $value, $data_type, $order ){ // filter... return $anon_value; }
- $anon_value(string)
- Value of this prop after anonymization.
- $prop(string)
- Name of the prop being removed.
- $value(string)
- Current value of the data.
- $data_type(string)
- Type of data.
- $order(WC_Order)
- An order object.
Changelog
Since 3.4.0 | Introduced. |
Where the hook is called
woocommerce_privacy_remove_order_personal_data_prop_value
woocommerce/includes/class-wc-privacy-erasers.php 290
$anonymized_data[ $prop ] = apply_filters( 'woocommerce_privacy_remove_order_personal_data_prop_value', $anon_value, $prop, $value, $data_type, $order );