This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is trying to change the button label from 'Book now' to 'Add to Cart' and translate it to German ('Zum Warenkorb hinzufügen') using WooCommerce Bookings. Despite modifying the functions.php file and using WPML to scan and translate the string, the German translation does not appear on the products.
Solution:
We recommended the client to ensure that the custom code in functions.php is correctly using the WPML translation function. Here is the code snippet that should be used:
add_filter( 'woocommerce_booking_single_add_to_cart_text', 'custom_booking_button_text_wpml' );<br />function custom_booking_button_text_wpml() {<br /> return __( 'Add to Cart', 'doras-cheesecake' );<br />}
We also suggested reproducing the issue in a new WordPress installation to determine if the problem is specific to the client's site or a general issue. If the problem persists, it might be necessary to review the theme or plugin compatibility or other specific configurations on the original site.
If this solution does not resolve the issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 6 replies, has 2 voices.
Last updated by 3 weeks, 1 day ago.
Assisted by: Carlos Rojas.