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: remove check for default meta values that isn’t working #235

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Mar 15, 2023

All Submissions:

Changes proposed in this Pull Request:

Could be a chore, too, because it doesn't change any behavior in the plugin. But it removes a check and condition that isn't working. Because register_meta is happening on the init hook, it's too early to determine the post type, so the default values for several meta fields are always inherit. This PR makes this explicit.

Related to Automattic/newspack-theme#2061 but isn't a blocker to that PR.

How to test the changes in this Pull Request:

Nothing really to test—you can confirm that get_post_meta with the following fields always returns inherit by default:

  • newspack_sponsor_sponsorship_scope
  • newspack_sponsor_native_byline_display
  • newspack_sponsor_underwriter_style
  • newspack_sponsor_underwriter_placement

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo added bug Something isn't working [Status] Needs Review labels Mar 15, 2023
@dkoo dkoo self-assigned this Mar 15, 2023
@dkoo dkoo requested a review from a team as a code owner March 15, 2023 22:26
@dkoo
Copy link
Contributor Author

dkoo commented Mar 23, 2023

The test-js CI job failed due to some NPM errors, but this repo contains no JS tests, so merging.

@dkoo dkoo merged commit d45f64b into master Mar 23, 2023
@dkoo dkoo deleted the fix/remove-nonfunctional-check branch March 23, 2023 16:39
matticbot pushed a commit that referenced this pull request Mar 31, 2023
## [1.10.7-alpha.1](v1.10.6...v1.10.7-alpha.1) (2023-03-31)

### Bug Fixes

* remove check for default meta values that isn’t working ([#235](#235)) ([d45f64b](d45f64b))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.10.7-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Apr 10, 2023
## [1.10.7](v1.10.6...v1.10.7) (2023-04-10)

### Bug Fixes

* remove check for default meta values that isn’t working ([#235](#235)) ([d45f64b](d45f64b))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.10.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants