Skip to content

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
@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.

5 participants