diff --git a/plugins/woocommerce/changelog/add-credit-card-i18n-context b/plugins/woocommerce/changelog/add-credit-card-i18n-context new file mode 100644 index 00000000000..d4a62357142 --- /dev/null +++ b/plugins/woocommerce/changelog/add-credit-card-i18n-context @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Add context to translatable strings for credit card labels. diff --git a/plugins/woocommerce/includes/wc-core-functions.php b/plugins/woocommerce/includes/wc-core-functions.php index cb67f8e70d4..86100564f40 100644 --- a/plugins/woocommerce/includes/wc-core-functions.php +++ b/plugins/woocommerce/includes/wc-core-functions.php @@ -1560,12 +1560,12 @@ function wc_get_credit_card_type_label( $type ) { $labels = apply_filters( 'woocommerce_credit_card_type_labels', array( - 'mastercard' => __( 'MasterCard', 'woocommerce' ), - 'visa' => __( 'Visa', 'woocommerce' ), - 'discover' => __( 'Discover', 'woocommerce' ), - 'american express' => __( 'American Express', 'woocommerce' ), - 'diners' => __( 'Diners', 'woocommerce' ), - 'jcb' => __( 'JCB', 'woocommerce' ), + 'mastercard' => _x( 'MasterCard', 'Name of credit card', 'woocommerce' ), + 'visa' => _x( 'Visa', 'Name of credit card', 'woocommerce' ), + 'discover' => _x( 'Discover', 'Name of credit card', 'woocommerce' ), + 'american express' => _x( 'American Express', 'Name of credit card', 'woocommerce' ), + 'diners' => _x( 'Diners', 'Name of credit card', 'woocommerce' ), + 'jcb' => _x( 'JCB', 'Name of credit card', 'woocommerce' ), ) );