Search Documentation

WP Travel Developer Documentation

  1. Home
  2. Docs
  3. WP Travel Developer Documentation
  4. Filters
  5. Filter : gettext

Filter : gettext

This filter helps to replace the text ‘Pricing Name’.

Example :

add_filter( 'gettext', 'wp_travel_change_field_names', 20, 3 );
function wp_travel_change_field_names( $translated_text, $text, $domain ) {
    if ( is_singular() ) {
      switch ( $translated_text ) {
      case 'Pricing Name' :
      $translated_text = __( 'your text here', 'wp-travel' );
      break;
      }
    }
return $translated_text;
}
Was this article helpful to you? Yes No

How can we help?