Version 2.8 of WooCommerce Wholesale Ordering adds full support for the Aelia Currency Switcher plugin. In addition, you can use WPML & WCML for multilingual capabilities, while using the Aelia Currency Switcher to provide multi-currency support (as opposed to using WCML Multi-Currency), and that combination is now fully compatible with Wholesale Ordering.
Version 2.8 of Wholesale Ordering was created and tested using version 126.96.36.199408 of the Aelia Currency Switcher.
When the Aelia Currency Switcher is active on your site, there will be a new section “Aelia Integration” within the Wholesale tab of the WooCommerce>Settings page.
The first setting is a check box labelled “Create manual wholesale currency prices?”. This is enabled by default and will create wholesale price fields for every currency you set up with Aelia, to allow you to enter manual wholesale prices for each currency. However, if you always plan on using automatic currency conversion, you can un-check this setting, and the wholesale price fields will NOT be shown for each currency in the product editor.
This second setting is a check box labelled “Save min/max currency prices”. This is enabled by default and will save the min & max variation wholesale prices for each active currency in the post meta table for the Variable parent product. If you have a lot of Variable products displayed in your shop, this may help speed up the page load time as the displayed price range will be shown by getting those saved min/max values from the database, as opposed to looping through every child variation of the Variable product, calculating the wholesale price for each, and determining the min and max. If you disable this feature, wholesale price ranges for Variable products will always be calculated by looping through all variations and calculating the price for each. However, if you are using automatic currency conversion and one of the services to automatically update exchange rates on a regular basis, you will probably want to un-check this setting, or else your displayed price ranges for Variable products will be wrong every time the exchange rates change unless you re-sync all your variable products. Note that when an individual variation is selected on the product page, the correct price will still be calculated and used for that variation, it would just be the min/max price range that would be wrong.
After Aelia has been enabled and you have added the additional currencies you want to use, you should run the Sync Variable Products function again so that default values can be set for every currency. This should be done whether or not you are using saved min/max currency prices. After that, Variable products will automatically sync (individually) any time that you edit them.
Currency Minimum Wholesale Order Amounts
This settings section allows you to manually set different minimum wholesale order amounts for each currency. To use this feature, you first have to have a minimum order amount set in the General section of the Wholesale tab of the WooCommerce>Settings page. The minimum order amount you set in the General section will be used for your default currency. Once you have an amount set there, then you can manually set the minimum order amount for other currencies in the Aelia Integration section. If you leave the values for each currency blank there, then those values will be automatically calculated based on the currency exchange rates you have set in the Aelia plugin. But, if the exchange rates make those an odd value, you can manually set them in this section to whatever you want.
WPML Product Translations
You shouldn’t have to change anything for Wholesale Ordering to work with product translations, even when using Aelia to handle multi-currency prices. The wholesale product meta fields (wholesale price for each currency, wholesale only, wholesale tax status, and wholesale tax class), are set to be copied to translations.
However, you need to make sure to create and translate the products the correct way for this to work. I strongly suggest that you use the WPML recommended way of using their own “WPML Translation Editor” to translate products, instead of using the “Native WooCommerce product editing screen” to edit your translations. In short, you should always duplicate your products after you create the original product in the main site language and edit the text translations using the product WPML Translation editor. Alternately, you can go directly to the Translation Editor and create translations of existing products there. Using one of those two ways, the prices and all other product fields set to “copy” will always be copied to all translations, and you won’t have to worry about prices getting out of sync between translations. If you ever need to change prices, you use the regular WooCommerce product editor, while your admin area is set to the site default language, and then just change the prices on only that version of the product. When you hit update, those prices will be copied to any other language versions.
To summarize, if you are creating a new product, make sure you are creating it in the default language of your site. After you enter all the info and publish the product, you have two ways to create the translations. Right after the product is published, you will see some new options in the Language meta box above the Publish box. You can either check the boxes for the “Duplicate” option, which will simply duplicate the product with the default language text to each translated language (you can edit the text for the other translations later), or you can click on the + signs to create the translation and open the Translation Editor for that product to edit the text right then. The third option is to do nothing, which will then leave that product in only the default language, and you can come back to it later to create the translations.
Unless you have a very strong reason to, it is NOT recommended to use the Native WooCommerce product editing screen and then to create an independent product copy for each language (you can do that if you are editing the product in a non-default language and you set the “This is a translation of” select box to “none”). If you do that and save the product, then that particular language product becomes its own separate product, with its own independent price fields (the fields will become unlocked after you publish it). At that point, you will need to remember that your different language versions of that product are no longer synchronized, so if you change the prices of one language, you need to remember to change the prices for the other language versions as well.
If you are using Aelia Currency Switcher to handle your multi-currency prices (with or without WPML), then wholesale prices will work fully with Aelia, with either automatic conversions, or manual setting of prices for each currency.
If you already have wholesale prices entered for your products in the default language, and you enable multi-currency mode and add some additional currencies, then by default, all prices, including wholesale prices, will be automatically converted to the other currencies based on the currency exchange rates you set when you set up the additional currencies. There is nothing additional you need to do for this to work. However, if you have Variable products, you should run the Sync Variable Products function again so that the mix/max variation prices can be calculated for each variable product for the shop price range display (they will be calculated with the exchange rates you set). Alternately, you can disable the saving of min/max variation prices for each currency (as described above), and those price ranges will be re-calculated on every page load.
If you don’t want to use automatic currency conversion, you can manually enter wholesale prices for each product or variation in each currency. You must have the option set to “Create manual wholesale currency prices?” on the Aelia Integration section of the Wholesale settings tab in WooCommerce settings. If that is enabled (default), you will then be presented with a set of wholesale price fields for each additional currency. For each currency, you can manually enter a wholesale price, or leave it blank (placeholder will show “Auto”). If you leave it blank for one or more currencies, then the wholesale price for each blank currency will be automatically calculated based on the currently set exchange rate. Thus, “manual” currency prices only apply if you actually enter a wholesale price for that specific currency, otherwise it will still be calculated automatically. In other words, it’s not possible to not have a wholesale price for only some currencies… it’s all or nothing.
The only exception/quirk to the manual prices is that if you leave the wholesale price blank for the default currency, you can still manually enter wholesale prices for one or more other currencies, in which case you will only see wholesale prices (and only be able to add-to-cart) when viewing in one of the currencies where you did enter a price. However, if you have the Wholesale Ordering plugin set to hide products without a wholesale price (from Wholesale Customers), then that product will never show up in the shop loop no matter what currency you are currently set to, since the query that filter products without prices is done on the main (default currency) wholesale price meta field. Also, WooCommerce will sometimes remove the product from the cart saying it can no longer be purchased when there is no price in the default currency. I’m not sure why you would ever want to set up any products that way, but it is possible.