Changing woocommerce text mini buttons
On our website for ergotopia.de, I am trying to change the button text of the dropdown mini art as you can see in the picture. To reduce confusion: on ergotopia.de its text is correct, but since the update (which we are testing in our step) it changes the text of the buttons and I cannot change the text.
I have tried the following things with no success:
- translations via loco-translate
-
functions.php with the following code:
add_filter('gettext', 'translate_text'); add_filter('ngettext', 'translate_text');
function translate_text($translated) { $translated = str_ireplace('Kasse', 'Weiter zur Kasse', $translated); return $translated; }
-
In the child theme (childtheme \ woocommerce \ includes \ wc-template-functions.php) I edited the file on line 1487:
function woocommerce_widget_shopping_cart_proceed_to_checkout() { echo '<a href="' . esc_url( wc_get_checkout_url() ) . '" class="button checkout wc-forward">' . esc_html__( 'Weiter zur Kasse', 'woocommerce' ) . '</a>'; }
Do you know how to change it?
source to share