Quote from Abdullah on November 3, 2020, 03:10
Hello , When i search for sku as empty , not results will be shown. if I deactivate WPML plugins. it work fine
Do you got temporary solution?
This is the last query run by your plugin with WPML when I press on filter button
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = '_sku' ) LEFT JOIN wp_icl_translations wpml_translations
ON wp_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT('post_', wp_posts.post_type) WHERE 1=1 AND (
wp_postmeta.post_id IS NULL
) AND wp_posts.post_type = 'product' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private')) AND ( ( ( wpml_translations.language_code = 'ar' OR 0 ) AND wp_posts.post_type IN ('post','page','attachment','wp_block','blocks','product','product_variation','featured_item' ) ) OR wp_posts.post_type NOT IN ('post','page','attachment','wp_block','blocks','product','product_variation','featured_item' ) ) AND ( wp_posts.ID IN(41417,41413,41409,41404,41405) ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_title DESC LIMIT 0, 100
if I remove manually
( wpml_translations.language_code = 'ar' OR 0 ) AND
it will work
PRIVATE DATA
Hello , When i search for sku as empty , not results will be shown. if I deactivate WPML plugins. it work fine
Do you got temporary solution?
This is the last query run by your plugin with WPML when I press on filter button
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = '_sku' ) LEFT JOIN wp_icl_translations wpml_translations
ON wp_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT('post_', wp_posts.post_type) WHERE 1=1 AND (
wp_postmeta.post_id IS NULL
) AND wp_posts.post_type = 'product' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private')) AND ( ( ( wpml_translations.language_code = 'ar' OR 0 ) AND wp_posts.post_type IN ('post','page','attachment','wp_block','blocks','product','product_variation','featured_item' ) ) OR wp_posts.post_type NOT IN ('post','page','attachment','wp_block','blocks','product','product_variation','featured_item' ) ) AND ( wp_posts.ID IN(41417,41413,41409,41404,41405) ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_title DESC LIMIT 0, 100
if I remove manually
( wpml_translations.language_code = 'ar' OR 0 ) AND
it will work
PRIVATE DATA