Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Snippet to remove the ShipTo (Receiver) phone number from UPS label (doesn't remove it when UPS Next Day Air Early AM service is selected or shipment is international)
- */
- add_filter( 'wf_ups_shipment_confirm_request_data', 'xa_ups_remove_customer_phone_number', 10, 2 );
- if( ! function_exists('xa_ups_remove_customer_phone_number') )
- {
- function xa_ups_remove_customer_phone_number( $request_arr, $order )
- {
- if( ( $request_arr['Shipment']['Service']['Code'] != 14 ) && ( $request_arr['Shipment']['Shipper']['Address']['CountryCode'] == $request_arr['Shipment']['ShipTo']['Address']['CountryCode'] ) )
- {
- unset($request_arr['Shipment']['ShipTo']['PhoneNumber']);
- }
- return $request_arr;
- }
- }
Add Comment
Please, Sign In to add comment