Product Icon

Conditional Shipping and Payments

by  Woo
Use conditional logic to restrict the shipping and payment options available on your store.

Compatibility with Aelia Currency Switcher

I contacted the aelia support team and they told me it should very easy to be compatible with them. support@aelia.co Here is there email:

The best course of action would be to contact the authors of the Conditional Shipping and Payments plugin (let’s call it CSP, for short) to confirm this hypothesis. They should also be able to suggest a way to make the CSP detect the Currency Switcher (e.g. with some filter or special command), and behave like it would do with the other multi-currency plugin they already support.

Possible “trick”
The CSP looks for a constant called WOOCOMMERCE_MULTICURRENCY_VERSION to enable its own currency-specific rules. If that’s all that is needed, it could be possible to trick the plugin into detecting the currency switcher by setting the same constant. For example:
if(!defined(‘WOOCOMMERCE_MULTICURRENCY_VERSION’)) {
// Define the constant WOOCOMMERCE_MULTICURRENCY_VERSION with any value
define(‘WOOCOMMERCE_MULTICURRENCY_VERSION’, ‘1.2.3’);
}
​
💡 Important notes
We wouldn’t know for certain where this snippet could go, because we don’t know how early the CSP plugin checks for the presence of the constant. That’s something that the authors of that plugin would have to help with.
Defining a constant this way could cause an error if someone else tries to define it again at a later stage. It would be much better if the CSP plugin could provide a filter to detect if the multi-currency feature should be enabled. That’s also something that the plugin’s authors would have to look into, as the filter would have to be added to their code.

If the author of the CSP plugin have any questions, they can reach us directly and we will be happy to assist them to get this done quickly.

Regards,

Diego – Aelia Support

It would be nice if you are able to implement this compatibility asap, as we have bought your plugin and it is not usable without the currency detection for us.
Regards,
Florent and Jon from fvp-moto.ch

Author

florentpicaud

Current Status

Open

Last updated: June 14, 2023

0 comments

Log in to comment on this feature request.