Last active
September 27, 2021 13:47
-
-
Save zorem/fa7d49b8c51d3995441a16d1af782f7d to your computer and use it in GitHub Desktop.
Code snippet for modify tracking event description and tracking event location for TrackShip tracking page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Trackship.info | |
* tracking event description modify | |
*/ | |
add_filter( 'trackship_tracking_event_description', 'trackship_tracking_event_description', 10, 1 ); | |
function trackship_tracking_event_description( $message ){ | |
$search = array( | |
"China,", | |
"China", | |
"Rusia", | |
"USA" | |
); | |
$message = str_replace( $search, "", $message ); | |
return $message; | |
} | |
/* | |
* Trackship.info | |
* tracking event location modify | |
*/ | |
add_filter( 'trackship_tracking_event_location', 'trackship_tracking_event_location', 10, 1 ); | |
function trackship_tracking_event_location( $location ){ | |
$search = array( | |
"China,", | |
"China", | |
"Rusia", | |
"USA" | |
); | |
$location = str_replace( $search, "", $location ); | |
return $location; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment