|
YITh add-on plugin options don’t show
发起人: next-sasD
中: English Support
可提供快速解决方案
Problem:
YITH Global options do not show in the translated language
Solution:
The problem is that YITH WooCommerce Product is inserting the rule per product in wp_yith_wapo_blocks but only for the original one.
To fix that:
- Open .../wp-content/plugins/yith-woocommerce-product-add-ons/includes/class-yith-wapo-front.php
- Look for line 282.
- Change:
$included_product_check = in_array( (string) $product_id, (array) $block->get_rule( 'show_in_products' ), true );
- With:
if (class_exists('sitepress')) {
$wpml_default_lang = apply_filters('wpml_default_language', NULL);
$wpml_product_id = apply_filters('wpml_object_id', $product_id, 'product', FALSE, $wpml_default_lang);
$included_product_check = in_array((string) $wpml_product_id, (array) $block->get_rule('show_in_products'), true);
} else {
$included_product_check = in_array((string) $product_id, (array) $block->get_rule('show_in_products'), true);
}
|
|
2 |
8 |
1 years, 10 months前
next-sasD
|