wpml

Display product prices in the local currency with a shortcode by product ID in WPML WooCommerce Multilingual

纵饮孤独 提交于 2021-02-11 12:41:58
问题 I've modified this custom code to to display products with a shortcode to create my own version which also changes the currency depending on the page language. For example: If the page is in English, the prices are displayed in British Pounds. If the page is in Spanish, the prices are displayed in EURO. Last week WPML updated their WooCommerce Multilingual plugin to enable currency depending on user location . This is what I need! For example: If the user is in United States, the prices are

Display product prices in the local currency with a shortcode by product ID in WPML WooCommerce Multilingual

妖精的绣舞 提交于 2021-02-11 12:41:31
问题 I've modified this custom code to to display products with a shortcode to create my own version which also changes the currency depending on the page language. For example: If the page is in English, the prices are displayed in British Pounds. If the page is in Spanish, the prices are displayed in EURO. Last week WPML updated their WooCommerce Multilingual plugin to enable currency depending on user location . This is what I need! For example: If the user is in United States, the prices are

Changing specific order details text in Woocommerce order received page

人走茶凉 提交于 2021-02-08 08:21:30
问题 On the order-recieved page (' woocommerce_thankyou ') there is a table with the order details a heading "Order Details" ( Ordredetaljer in my native language). I cannot figure out how to change this heading. I can't even find the source code for it properly. If someone could tell me the string(We use wpml for string translation) or the source code I would be a happy developer. 回答1: The template you are looking for is located in order/order-details.php But as WooCommerce templates doesn't seem

Output taxonomy term names for translations

爷,独闯天下 提交于 2020-07-22 22:43:53
问题 I'm currently outputting the term id's for several languages on a page. How can I output the term names for each instead? I've tried to use the get_term function to specifically get the French name for the taxonomy term and it still comes out in English even though the ID is the French id. Where am I going wrong? <?php $taxonomy = "categories"; $terms = get_terms( array( 'suppress_filters' => false, 'taxonomy' => $taxonomy, 'hide_empty' => false, ) ); if ($terms) { foreach ($terms as $term )

Converting a DOM element into a string in PHP

拈花ヽ惹草 提交于 2020-01-25 19:57:07
问题 I am running a Wordpress site and using WPML translation plugin. In WPML there is a method called icl_link_to_element(2880); that returns and generates the following element in the DOM: <a href="https://www.someurl.com/es/atencion-al-cliente">Atención al cliente</a> I want to convert this element to a string so that I can simply return and store the last part of the url atencion-al-cliente , into a unique variable. What's the best way to get this done? Answer to the comment below: Two

woocommerce category translation

我是研究僧i 提交于 2020-01-04 08:21:52
问题 I'm trying to create a web shop with WooCommerce and Polylang. When I click the '+' icon in a product category in order to translate it into French, I'm routed to a 'new category' form. After I created the 'book' category in French ('libre'), I see that the 'book' category contains 8 items, while the 'libre' category contains zero. Is it a known issue that the relations between items get 'lost in translation' in Polylang / WooCommerce? Should I try another webshop implementation if I want an

How to translate Wordpress content of post or page with .po files [closed]

≯℡__Kan透↙ 提交于 2019-12-20 02:59:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . For Wordpress/WooCommerce, I want to find a plugin to translate content of post, pages, custom post-types, like based on .po files, not WPML because a lot of paragraph need to reuse that. What can I use for this purpose? 回答1: You can't translate content of posts or pages with something based on .po / .mo files,

Adding a code to WordPress header based on local language into functions.php

耗尽温柔 提交于 2019-12-12 05:16:06
问题 I have to add a Javascript code to a WordPress header based on the current language used by the website. We use WPML string translation. I want to write a function like this: function add_customcode_header(){ ?> if(ICL_LANGUAGE_CODE == 'ru') { <script> code 1 </script> } else { <script> code 2 </script> } } <?php add_action('wp_head', 'add_customcode_header'); This function should place the script with code 1 contents if the website language parameter is set to 'ru' and IF the language

Wordpress custom post language WPML

放肆的年华 提交于 2019-12-11 16:19:59
问题 Hi I have a custom type post and it has a translation. When am calling all the custom post i get every items in double. Is there a way to check which language is the post set to? Thank you 回答1: I think this could help you http://wpml.org/faq/how-to-translate-custom-types/ Assuming that you setted up your custom type post, according to wpml: If you are using the Translation Management module, go to WPML->Translation Managementand click on the Multilingual Content Setup tab. Otherwise, without

Restrict woocommerce product to certain customer to buy

谁说我不能喝 提交于 2019-12-10 11:59:06
问题 I am setting up an eCommerce website selling household's stuff. I'd like some products to be purchased by regular visitors but some products (with lots of discounts) are retricted to certain Memberships only (namely wholesalers) and these products shows to every visitors but when a regular visitor clicks on "add to cart", it will re-direct to a membership registeration form with a note: Only wholesale member are allowed to purchase this item. I am building a woocomerce multilingual website