woocommerce_privacy_remove_order_personal_data_meta_value
Expose a way to control the anonymized value of a value via 3rd party code.
Использование
add_filter( 'woocommerce_privacy_remove_order_personal_data_meta_value', 'wp_kama_woocommerce_privacy_remove_order_personal_data_meta_value_filter', 10, 5 ); /** * Function for `woocommerce_privacy_remove_order_personal_data_meta_value` filter-hook. * * @param string $anon_value Value of this data after anonymization. * @param string $prop meta_key key 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_meta_value_filter( $anon_value, $prop, $value, $data_type, $order ){ // filter... return $anon_value; }
- $anon_value(строка)
- Value of this data after anonymization.
- $prop(строка)
- meta_key key being removed.
- $value(строка)
- Current value of the data.
- $data_type(строка)
- Type of data.
- $order(WC_Order)
- An order object.
Список изменений
С версии 3.4.0 | Введена. |
Где вызывается хук
woocommerce_privacy_remove_order_personal_data_meta_value
woocommerce/includes/class-wc-privacy-erasers.php 329
$anon_value = apply_filters( 'woocommerce_privacy_remove_order_personal_data_meta_value', $anon_value, $meta_key, $value, $data_type, $order );