Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
fixes #545 props mrleemon
Browse files Browse the repository at this point in the history
fixes #545 keep fields unlocked if products does not exist in default
language props mrleemon
  • Loading branch information
Jon007 committed May 16, 2021
1 parent 479b3cb commit b43c494
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions 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)
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/Hyyan/WPI/Product/Meta.php
Expand Up @@ -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;
Expand Down

0 comments on commit b43c494

Please sign in to comment.