Guest User

Untitled

a guest
Jan 19th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. /**
  2. * 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)
  3. */
  4. add_filter( 'wf_ups_shipment_confirm_request_data', 'xa_ups_remove_customer_phone_number', 10, 2 );
  5.  
  6. if( ! function_exists('xa_ups_remove_customer_phone_number') )
  7. {
  8. function xa_ups_remove_customer_phone_number( $request_arr, $order )
  9. {
  10. if( ( $request_arr['Shipment']['Service']['Code'] != 14 ) && ( $request_arr['Shipment']['Shipper']['Address']['CountryCode'] == $request_arr['Shipment']['ShipTo']['Address']['CountryCode'] ) )
  11. {
  12. unset($request_arr['Shipment']['ShipTo']['PhoneNumber']);
  13. }
  14. return $request_arr;
  15. }
  16. }
Add Comment
Please, Sign In to add comment