This thread is resolved. Here is a description of the problem and solution.
Problem:
You are using YayMail Commerce with the YayMail Conditional Logic addon. While it works correctly in English, the addon does not display product categories in Italian, preventing the conditional logic from triggering. This issue occurs when you switch to Italian to style the mail; the categories listed in the conditional logic remain in English. Additionally, when setting the conditional logic to Product instead of Category, products related to one category are listed twice, indicating that Conditional Logic sees both the English and Italian product versions.
Solution:
We recommend trying the following workaround:
In your WordPress installation, navigate to
/wp-content/plugins/yaymail-pro/includes/Page/Settings.php
. At line 415, right before the code block:
$product_categories = get_terms( array( 'taxonomy' => 'product_cat', 'orderby' => $orderby, 'order' => $order_category, 'hide_empty' => $hide_empty, ) );
Add the following code:
// WPML Workaround for compsupp-7838 if (class_exists('Sitepress')) { do_action('wpml_switch_language', $active_language); }
This code snippet ensures that the language context switches to the active language, potentially resolving the issue with category and product translations.
Please note that the free version of YayMail is not compatible with WPML. If this solution does not resolve your 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 the problem persists, please open a new support ticket.
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 0 voices.
Last updated by 1 week, 3 days ago.
Assisted by: Dražen.