Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 qtranslate – [espresso_cart_link] takes me back to default language | Event Espresso - Staging Server
I have edited the cart.php file (function event_espresso_cart_link($atts)) so as to check what the current language is (qtrans_getLanguage()) and add the adequate suffix to the redirection url, but when the button is clicked on the starting page in FR, ES or DE, the [espresso_cart_link] shortcode always takes me back to the next page in the default language (EN), whatever the language of the previous page is.
It seems that the [espresso_cart_link] shortcode gets back to default language before the language of the starting page can be stored in the variable declared in event_espresso_cart_link($atts)).
Any idea ?
This topic was modified 11 years, 3 months ago by bmachuel.
The cart.php file is a core file that should not be modified. We can not offer support for core modifications. If you would like to modify the shopping cart, please modify the shopping_cart.php file in the templates directory.
You probably will have to modify the function event_espresso_load_checkout_page, but since it is a pluggable function, you can make a copy of that function in your theme’s functions.php file, the EE custom files add-on custom_functions.php file, or create a separate empty plugin to hold the custom function. That way you are not modifying the core EE files and your modification will not be overwritten the next time you update EE.
Are you using the “direct to cart” mode of the cart link shortcode, or do you get a “view cart” link after you add an item to the cart? I believe you will want to modify the build of the $cart_page_url on line 668.
Viewing 3 reply threads
The support post ‘qtranslate – [espresso_cart_link] takes me back to default language’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.