woocommerce_privacy_remove_order_personal_data_props хук-фильтр . WC 3.4.0
Expose props and data types we'll be anonymizing.
Использование
add_filter( 'woocommerce_privacy_remove_order_personal_data_props', 'filter_function_name_9235', 10, 2 ); function filter_function_name_9235( $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 235-264
$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', 'customer_id' => 'numeric_id', 'transaction_id' => 'numeric_id', ), $order );