Hi Chris,
I should be able to make a change like that within the plugin that gets that working, although to maintain the translation capabilities makes it a bit more complex so it’ll take a little while for me to think it through.
In the meantime, you should be able to add this code to your theme’s functions.php:
add_filter( 'gettext', 'change_gazchaps_po_number_field', 20, 3 );
function change_gazchaps_po_number_field( $translated, $original, $textdomain ) {
// only apply if we're on the checkout or in the admin panel
// and the text domain is the correct one
if ( ( is_checkout() || is_admin() ) && 'gazchaps-woocommerce-purchase-order-payment-gateway' == $textdomain ) {
// change the various bits of text that mention "Purchase Order" to "Roll Number"
// replace your_textdomain with your theme's textdomain!
switch ( $translated ) {
case "Purchase Order":
$translated = __( 'Roll Number', 'your_textdomain' );
break;
case "Purchase Order Number":
case "PO Number":
$translated = __( 'Roll Number', 'your_textdomain' );
break;
case "Please complete the Purchase Order details.":
$translated = __( 'Please complete the Roll Number details.', 'your_textdomain' );
break;
case "Please enter a Purchase Order Number.":
$translated = __( 'Please enter a Roll Number.', 'your_textdomain' );
break;
}
}
return $translated;
}
Remember to change the occurrences of “your_textdomain” with the text domain you’re using in your theme, if known. You’ll also need to change the title for the payment method to “Roll Number” in the plugin settings ??