woocommerce_privacy_remove_order_personal_data_props
Expose props and data types we'll be anonymizing.
Использование
add_filter( 'woocommerce_privacy_remove_order_personal_data_props', 'wp_kama_woocommerce_privacy_remove_order_personal_data_props_filter', 10, 2 ); /** * Function for `woocommerce_privacy_remove_order_personal_data_props` filter-hook. * * @param array $props Keys are the prop names, values are the data type we'll be passing to wp_privacy_anonymize_data(). * @param WC_Order $order A customer object. * * @return array */ function wp_kama_woocommerce_privacy_remove_order_personal_data_props_filter( $props, $order ){ // filter... return $props; }
- $props(массив)
- Keys are the prop names, values are the data type we'll be passing to wp_privacy_anonymize_data().
- $order(WC_Order)
- A customer object.
Список изменений
С версии 3.4.0 | Введена. |
Где вызывается хук
woocommerce_privacy_remove_order_personal_data_props
woocommerce/includes/class-wc-privacy-erasers.php 236-266
$props_to_remove = apply_filters( 'woocommerce_privacy_remove_order_personal_data_props', array( 'customer_ip_address' => 'ip', 'customer_user_agent' => 'text', 'billing_first_name' => 'text', 'billing_last_name' => 'text', 'billing_company' => 'text', 'billing_address_1' => 'text', 'billing_address_2' => 'text', 'billing_city' => 'text', 'billing_postcode' => 'text', 'billing_state' => 'address_state', 'billing_country' => 'address_country', 'billing_phone' => 'phone', 'billing_email' => 'email', 'shipping_first_name' => 'text', 'shipping_last_name' => 'text', 'shipping_company' => 'text', 'shipping_address_1' => 'text', 'shipping_address_2' => 'text', 'shipping_city' => 'text', 'shipping_postcode' => 'text', 'shipping_state' => 'address_state', 'shipping_country' => 'address_country', 'shipping_phone' => 'phone', 'customer_id' => 'numeric_id', 'transaction_id' => 'numeric_id', ), $order );