Skip to content

Instantly share code, notes, and snippets.

@zorem
Last active December 27, 2019 12:34
Show Gist options
  • Save zorem/b3fe2e922c93d4874457e3ddcfb8c791 to your computer and use it in GitHub Desktop.
Save zorem/b3fe2e922c93d4874457e3ddcfb8c791 to your computer and use it in GitHub Desktop.
Code for update tracking page text
<?php
// Filter for change description before tracking form
// Default text - To track your order please enter your Order ID in the box below and press the "Track" button. This was given to you on your receipt and in the confirmation email you should have received.
add_filter( 'ast_tracking_page_front_text', 'ast_tracking_page_front_text_fun' );
function ast_tracking_page_front_text_fun($string){
$string = 'Updated Text';
return $string;
}
// Filter for change text of order label in form
// Default text - Order ID
add_filter( 'ast_tracking_page_front_order_label', 'ast_tracking_page_front_order_label_fun' );
function ast_tracking_page_front_order_label_fun($string){
$string = 'Updated Text';
return $string;
}
// Filter for change text of email label in form
// Default text - Order Email
add_filter( 'ast_tracking_page_front_order_email_label', 'ast_tracking_page_front_order_email_label_fun' );
function ast_tracking_page_front_order_email_label_fun($string){
$string = 'Updated Text';
return $string;
}
// Filter for change text of track button in form
// Default text - Track
add_filter( 'ast_tracking_page_front_track_label', 'ast_tracking_page_front_track_label_fun' );
function ast_tracking_page_front_track_label_fun($string){
$string = 'Updated Text';
return $string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment