Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

puntope
Copy link
Contributor

@puntope puntope commented Nov 21, 2024

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

@puntope puntope self-assigned this Nov 21, 2024
@puntope puntope requested review from mikkamp and a team November 21, 2024 15:37
@puntope puntope changed the base branch from develop to add/support-core-gtin-field November 21, 2024 15:37
@puntope puntope marked this pull request as ready for review November 21, 2024 15:37
@github-actions github-actions bot added the changelog: tweak Small change, that isn't actually very important. label Nov 21, 2024
Copy link

codecov bot commented Nov 21, 2024

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 ⚠️
src/Admin/Product/Attributes/AttributesForm.php 25.0% 3 Missing ⚠️
src/Admin/Input/Input.php 0.0% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                       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 Coverage Δ
js-unit-tests ?
php-unit-tests 65.2% <15.4%> (-0.2%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Admin/Input/Input.php 97.5% <0.0%> (-2.5%) ⬇️
src/Admin/Product/Attributes/AttributesForm.php 93.5% <25.0%> (-3.8%) ⬇️
src/Admin/Input/SelectWithTextInput.php 91.4% <14.3%> (-8.6%) ⬇️

... and 322 files with indirect coverage changes

---- 🚨 Try these New Features:

Copy link
Contributor

@mikkamp mikkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this extra scenario. It's working as expected. It took me a bit to understand how the field switches input type and why we are copying attributes from a different class. But I think that's more down to the decisions that were made in how to structure the field.

src/Admin/Product/Attributes/AttributesForm.php Outdated Show resolved Hide resolved
Co-authored-by: Mik <mikkamp@users.noreply.github.com>
@puntope puntope merged commit 934d0bc into add/support-core-gtin-field Nov 22, 2024
12 checks passed
@puntope puntope deleted the tweak/hide-yoast-gtin branch November 22, 2024 09:05
@ianlin ianlin mentioned this pull request Nov 26, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: tweak Small change, that isn't actually very important.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants