diff --git a/CHANGELOG.md b/CHANGELOG.md index 679fc09..a991471 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ### 1.5.1 +* [fixes #545 keep fields unlocked if products does not exist in default language props mrleemon](https://github.com/hyyan/woo-poly-integration/issues/545) * [fixes #549 Quick edit Product synchronisation issues](https://github.com/hyyan/woo-poly-integration/issues/549) * [fixes #548 incorrect save hook caused inconsistent synchronisation behaviour, especially changing product type and visibility](https://github.com/hyyan/woo-poly-integration/issues/548) * [fixes #542 shop page breadcrumb in secondary language](https://github.com/hyyan/woo-poly-integration/issues/542) diff --git a/readme.txt b/readme.txt index 18ae9c9..21f770b 100644 --- a/readme.txt +++ b/readme.txt @@ -137,6 +137,7 @@ Just make sure to setup your permalinks , and every thing will be fine , I promi == Changelog == == 1.5.1 == +* fixes #545 keep fields unlocked if products does not exist in default language props mrleemon * fixes #549 Quick edit Product synchronisation issues * fixes #548 incorrect save hook caused inconsistent synchronisation behaviour, especially changing product type and visibility * fixes #542 shop page breadcrumb in secondary language diff --git a/src/Hyyan/WPI/Product/Meta.php b/src/Hyyan/WPI/Product/Meta.php index c7bb495..0ffa910 100644 --- a/src/Hyyan/WPI/Product/Meta.php +++ b/src/Hyyan/WPI/Product/Meta.php @@ -178,7 +178,9 @@ public function handleProductScreen() if (isset($_GET['post'])) { $ID = absint($_GET['post']); - $disable = $ID && (pll_get_post_language($ID) != pll_default_language()); + //#545 props mrleemon, only disable if post has a master version in site default language + $disable = $ID && ( pll_get_post_language($ID) != pll_default_language() ) + && pll_get_post( $ID, pll_default_language() ); } elseif (isset($_GET['new_lang']) || $currentScreen->base == 'edit') { $disable = isset($_GET['new_lang']) && (esc_attr($_GET['new_lang']) != pll_default_language()) ? true : false;