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

gppa-acf-repeater-mapper.php: Fixed an issue with regular expression. #757

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

saifsultanc
Copy link
Contributor

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/2470092230/59496?folderId=3808239

Summary

A limitation with the ACF Repeater Mapper snippet if the repeater field has a number attached to the name.

So, if we processed for $key as meta_test_repeater_1_0_name. This will give us:

$repeater as test_repeater
$index as 1
$subfield as 0_name

This is because of the additional 1 attached to the name. The $repeater is actually test_repeater_1, $index is 0, and $subfield is name.

@saifsultanc saifsultanc added the bug Something isn't working label Jan 17, 2024
Copy link
Contributor

@claygriffiths claygriffiths left a comment

Choose a reason for hiding this comment

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

This regex LGTM!

CleanShot 2024-01-17 at 10 01 22

@saifsultanc saifsultanc marked this pull request as ready for review January 17, 2024 16:10
@saifsultanc saifsultanc merged commit 4db726c into master Jan 17, 2024
4 checks passed
@saifsultanc saifsultanc deleted the saif/fix/59496-fix-reg-exp branch January 17, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants