woocommerce_admin_order_preview_get_order_details
Использование
add_filter( 'woocommerce_admin_order_preview_get_order_details', 'wp_kama_woocommerce_admin_order_preview_get_details_filter', 10, 2 ); /** * Function for `woocommerce_admin_order_preview_get_order_details` filter-hook. * * @param $array * @param $order * * @return */ function wp_kama_woocommerce_admin_order_preview_get_details_filter( $array, $order ){ // filter... return $array; }
- $array
- -
- $order
- -
Где вызывается хук
woocommerce_admin_order_preview_get_order_details
woocommerce/includes/admin/list-tables/class-wc-admin-list-table-orders.php 421-439
return apply_filters( 'woocommerce_admin_order_preview_get_order_details', array( 'data' => $order->get_data(), 'order_number' => $order->get_order_number(), 'item_html' => self::get_order_preview_item_html( $order ), 'actions_html' => self::get_order_preview_actions_html( $order ), 'ship_to_billing' => wc_ship_to_billing_address_only(), 'needs_shipping' => $order->needs_shipping_address(), 'formatted_billing_address' => $billing_address ? $billing_address : __( 'N/A', 'woocommerce' ), 'formatted_shipping_address' => $shipping_address ? $shipping_address : __( 'N/A', 'woocommerce' ), 'shipping_address_map_url' => $order->get_shipping_address_map_url(), 'payment_via' => $payment_via, 'shipping_via' => $order->get_shipping_method(), 'status' => $order->get_status(), 'status_name' => wc_get_order_status_name( $order->get_status() ), ), $order );