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

Refactor to get the first element independently of its key #1945

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

puntope
Copy link
Contributor

@puntope puntope commented Apr 11, 2023

Changes proposed in this Pull Request:

Related to #1943

Even tho this is likely not happening because Wp_Terms are ordered starting from 0. I added this fix to be sure we return the first element of the array independently of the key.

That way we can be sure we can prevent the warning of Warning: Undefined array key 0

Detailed test instructions:

  1. Create a new attribute mapping rule with a taxonomy Color
  2. See the attribute mapping rule working as normally.

ℹ️ For not waiting the 30 minutes in order to sync the rules you can sync a specific product via connection test.

Additional details:

Changelog entry

Fix - Prevent potential warning when accessing undefined index.

@puntope puntope self-assigned this Apr 11, 2023
@github-actions github-actions bot added changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug. labels Apr 11, 2023
@puntope puntope requested a review from a team April 11, 2023 07:55
@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Merging #1945 (e4511c5) into develop (067aca2) will decrease coverage by 0.0%.
The diff coverage is 0.0%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             develop   #1945     +/-   ##
===========================================
- Coverage       56.8%   56.8%   -0.0%     
- Complexity      4101    4102      +1     
===========================================
  Files            456     456             
  Lines          17621   17623      +2     
===========================================
  Hits           10011   10011             
- Misses          7610    7612      +2     
Flag Coverage Δ
php-unit-tests 56.8% <0.0%> (-<0.1%) ⬇️

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

Impacted Files Coverage Δ
src/Product/WCProductAdapter.php 91.5% <0.0%> (-0.4%) ⬇️

@puntope puntope marked this pull request as draft April 11, 2023 08:01
@mikkamp mikkamp removed the request for review from a team February 12, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant