Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin shouldn't edit default payment button text #297

Open
eirikhr opened this issue Nov 4, 2022 · 1 comment
Open

Plugin shouldn't edit default payment button text #297

eirikhr opened this issue Nov 4, 2022 · 1 comment

Comments

@eirikhr
Copy link

eirikhr commented Nov 4, 2022

Regarding "Send order" button in checkout.

Line 22 in WC_Gateway_Blockonomics.php:

$this->order_button_text = __('Pay with bitcoin', 'blockonomics-bitcoin-payments');

This is unnecessary code.

It assumes two things.

  • It assumes that the website owner wants to overwrite the default order button text to English language, and add "bitcoin" to the name.
  • It assumes that the end user understands English.

The website owner cannot overwrite this variable in other ways, meaning the change is forced upon the website developer.

I suggest either removing the line completely, or adding it to a customizable setting variable.

@thisisayush
Copy link
Contributor

@eirikhr The variable's value is translatable and can be changed by the Website Owner from WordPress Admin to any desired value and in any language with the help of any Translation Plugin, here are some more details: https://www.wpbeginner.com/wp-tutorials/how-to-translate-a-wordpress-plugin-in-your-language/

More details about __ in Wordpress: https://developer.wordpress.org/reference/functions/__/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants