woocommerce / google-listings-and-ads

Sync your store with Google to list products for free, run paid ads, and track performance straight from your store dashboard.
https://woo.com/products/google-listings-and-ads/
GNU General Public License v3.0
47 stars 21 forks source link

[GTIN] Hide / disable GTIN also when YOAST is active. #2685

Closed puntope closed 9 hours ago

puntope commented 1 day ago

Changes proposed in this Pull Request:

Closes part of #2617

This PR fixes a Bug in which GTIN is not hidden or disabled when YOAST is activated.

Screenshots:

Screenshot 2024-11-21 at 19 33 26

Detailed test instructions:

  1. Install YOAST for WooCommerce
  2. Set the wp_option gla_install_versionas 2.8.6
  3. Go to a Product - Google for WooCommerce
  4. See the selector as disabled (if you selected "Enter custom value" it should be also disabled)
  5. Set the wp_option gla_install_version as 2.8.8
  6. See the selector hiden

Additional details:

Changelog entry

Fix - Hide/disable GTIN also when YOAST is active

codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.

Project coverage is 65.2%. Comparing base (25d85de) to head (e5dfc63). Report is 3 commits behind head on add/support-core-gtin-field.

Files with missing lines Patch % Lines
src/Admin/Input/SelectWithTextInput.php 14.3% 6 Missing :warning:
src/Admin/Product/Attributes/AttributesForm.php 25.0% 3 Missing :warning:
src/Admin/Input/Input.php 0.0% 2 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685/graphs/tree.svg?width=650&height=150&src=pr&token=UROWUPF1LX&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce)](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce) ```diff @@ Coverage Diff @@ ## add/support-core-gtin-field #2685 +/- ## =============================================================== + Coverage 64.7% 65.2% +0.5% - Complexity 4662 4674 +12 =============================================================== Files 799 478 -321 Lines 24627 19545 -5082 Branches 1242 0 -1242 =============================================================== - Hits 15936 12737 -3199 + Misses 8518 6808 -1710 + Partials 173 0 -173 ``` | [Flag](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce) | Coverage Δ | | |---|---|---| | [js-unit-tests](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce) | `?` | | | [php-unit-tests](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce) | `65.2% <15.4%> (-0.2%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce) | Coverage Δ | | |---|---|---| | [src/Admin/Input/Input.php](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685?src=pr&el=tree&filepath=src%2FAdmin%2FInput%2FInput.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce#diff-c3JjL0FkbWluL0lucHV0L0lucHV0LnBocA==) | `97.5% <0.0%> (-2.5%)` | :arrow_down: | | [src/Admin/Product/Attributes/AttributesForm.php](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685?src=pr&el=tree&filepath=src%2FAdmin%2FProduct%2FAttributes%2FAttributesForm.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce#diff-c3JjL0FkbWluL1Byb2R1Y3QvQXR0cmlidXRlcy9BdHRyaWJ1dGVzRm9ybS5waHA=) | `93.5% <25.0%> (-3.8%)` | :arrow_down: | | [src/Admin/Input/SelectWithTextInput.php](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685?src=pr&el=tree&filepath=src%2FAdmin%2FInput%2FSelectWithTextInput.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce#diff-c3JjL0FkbWluL0lucHV0L1NlbGVjdFdpdGhUZXh0SW5wdXQucGhw) | `91.4% <14.3%> (-8.6%)` | :arrow_down: | ... and [322 files with indirect coverage changes](https://app.codecov.io/gh/woocommerce/google-listings-and-ads/pull/2685/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=woocommerce)

🚨 Try these New Features: