function commerce_usps_trim_service in Commerce USPS 7
Function to clean the html garbage from rate MailService result *
Parameters
sting $service_name: The string returned by USPS that contains extra characters
Return value
string A cleaned and fomatted string
1 call to commerce_usps_trim_service()
- commerce_usps_rate in ./
commerce_usps.module - Shipping service callback: returns a base price array for a shipping service calculated for the given order.
File
- ./
commerce_usps.module, line 199 - Defines the USPS shipping method and services for Drupal Commerce.
Code
function commerce_usps_trim_service($service_name) {
return str_replace('<sup>&reg;</sup>', '', $service_name);
}