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

Fix custom field test #2749

Merged
merged 3 commits into from May 26, 2023
Merged

Fix custom field test #2749

merged 3 commits into from May 26, 2023

Conversation

nlemoine
Copy link
Member

Issue

While testing a new way to run tests, I stumbled upon this.

ACF functions shouldn't be used outside ACF integration tests.

Solution

Use update_post_meta.

Impact

None

ACF functions shouldn't be used outside ACF integration tests.
@coveralls
Copy link

coveralls commented May 26, 2023

Coverage Status

Coverage: 88.643% (+0.02%) from 88.623% when pulling 690bb61 on 2.x-fix-test-meta into b71a6bd on 2.x.

@nlemoine
Copy link
Member Author

The new way of running tests (using SQLite) I'm trying also brought this issue regarding truncating tables to my attention.

@gchtr gchtr added the 2.0 label May 26, 2023
@gchtr gchtr mentioned this pull request May 26, 2023
30 tasks
Copy link
Member

@Levdbas Levdbas left a comment

Choose a reason for hiding this comment

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

See docs of update_post_meta()
update_post_meta( int $post_id, string $meta_key, mixed $meta_value, mixed $prev_value = '' ): int|bool

First comes the id, then the key, then the value.

@nlemoine
Copy link
Member Author

Whoops, looks like I've been too fast on this 😅 Weird the tests pass, still.

It's fixed!

@nlemoine nlemoine merged commit 17563ba into 2.x May 26, 2023
50 of 52 checks passed
@nlemoine nlemoine deleted the 2.x-fix-test-meta branch May 26, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants