Yes, the “Credit card / debit card” text shown during checkout can be changed with many free translation plugins, such as Say What or Loco Translate. In fact, almost any string can be changed by using the text domain woocommerce-payments
. Currently, in Loco Translate, when adding a language/translation within WooPayments, the “system” location has to be selected – otherwise, the translation will not work.
Here’s how to change the “Credit card / debit card” text with Say What:
If you don’t want to use a translation plugin, you can try a simple code snippet:
function ah_change_credit_debit_text( $translation, $text, $domain ) {
if ( $domain == 'woocommerce-payments' && $text == 'Credit card / debit card' ) {
$translation = 'This string was changed with code!';
}
return $translation;
}
add_filter( 'gettext_woocommerce-payments', 'ah_change_credit_debit_text', 999, 3 );
The result is the same either way:
NOTE: Our support staff cannot help write or troubleshoot custom code.