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

Place order button from PayPal Card Processing does not get translated (196) #290

Closed
Sirvijver opened this issue Sep 28, 2021 · 0 comments · Fixed by #418
Closed

Place order button from PayPal Card Processing does not get translated (196) #290

Sirvijver opened this issue Sep 28, 2021 · 0 comments · Fixed by #418
Labels
bug Something isn't working
Milestone

Comments

@Sirvijver
Copy link
Collaborator

Sirvijver commented Sep 28, 2021

The problem
When the web store is in a none-english language and the payement system is via the PayPal Card Processing, the button "Place Order" does not get translated to the site language
image

Steps to reproduce

  1. Set site language to German (or any other language, except for English, that has been installed on your WP site).
  2. Enable PayPal Card Processing in WC PP Settings
  3. Make a purchase using Credit card from PPP. --> Button shows as "Place order"

OR

  1. Create an order via WC admin UI for your user.
  2. Go to My Account → Orders → Pay → Credit card. --> Button shows as "Pay for order"

Expected behaviour
All buttons should be in the same language.

Possible cause
The button label is generated in line 559 of this file \modules\ppcp-button\src\Assets\class-smartbutton.php:
$label = 'checkout' === $this->context() ? __( 'Place order', 'woocommerce-paypal-payments' ) : __( 'Pay for order', 'woocommerce-paypal-payments' );

Suggested solution
We should pull the label we are using for our button from a WooCommerce template instead of hardcoding it.

@Sirvijver Sirvijver added the bug Something isn't working label Sep 29, 2021
@isabellainpsyde isabellainpsyde changed the title Place order button from PayPal Card Processing does not get translated Place order button from PayPal Card Processing does not get translated (196) Oct 7, 2021
@Dinamiko Dinamiko added this to the Next Version milestone Jan 10, 2022
@Dinamiko Dinamiko mentioned this issue Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants