Add shipping-phone to Delivery
Shipping-phone is not part of Woocommerce standard. But you can have custom functionality to register and store this information from your customers.
To properly add this phone number to deliveries, use this filter
To properly add this phone number to deliveries, use this filter
add_filter('logistra_robots_parts_cosignee_phone', "custom_change_phone_number", 10, 2);function custom_change_phone_number($phone, $order_id) { $order = wc_get_order($order_id); $shipping_phone = $order->get_SHIPPING_phone(); // Swap this out we internal logic for fetching shipping-phone if($shipping_phone) { // Check if you have got a valid phone number $phone = $shipping_phone; } return $phone}
Updated on: 06/06/2024
Thank you!