Skip to content

Instantly share code, notes, and snippets.

@renjith-ph
Created January 14, 2019 08:05
Show Gist options
  • Save renjith-ph/db54da65d3bff0b661d26be2ca3efb8d to your computer and use it in GitHub Desktop.
Save renjith-ph/db54da65d3bff0b661d26be2ca3efb8d to your computer and use it in GitHub Desktop.
Snippet to add extra product description for UPS international shipping.
/* Snippet to add extra product description for UPS international shipping.
Created at : 14 Jan 2019 PluginHive Plugins : https://www.pluginhive.com/plugins/
*/
add_filter( 'wf_ups_shipment_confirm_request_product_details', 'ph_ups_add_extra_product_description_for_commercial_invoice', 10, 2 );
if( ! function_exists('ph_ups_add_extra_product_description_for_commercial_invoice') ) {
function ph_ups_add_extra_product_description_for_commercial_invoice( $product_details, $product_data ) {
$description=".Add your description here"; // add extra description in the commercial invoice.
$product_details['Description']=$product_details['Description'].$description;
return $product_details;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment