-
Notifications
You must be signed in to change notification settings - Fork 109
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
De-duplicate logic between REST API and URL Metrics post type #1867
base: trunk
Are you sure you want to change the base?
De-duplicate logic between REST API and URL Metrics post type #1867
Conversation
Signed-off-by: Shyamsundar Gadde <[email protected]>
Signed-off-by: Shyamsundar Gadde <[email protected]>
Signed-off-by: Shyamsundar Gadde <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #1867 +/- ##
==========================================
- Coverage 66.64% 66.63% -0.01%
==========================================
Files 88 88
Lines 7015 7011 -4
==========================================
- Hits 4675 4672 -3
+ Misses 2340 2339 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shyamsundar Gadde <[email protected]>
plugins/optimization-detective/storage/class-od-url-metrics-post-type.php
Outdated
Show resolved
Hide resolved
…etric Signed-off-by: Shyamsundar Gadde <[email protected]>
Signed-off-by: Shyamsundar Gadde <[email protected]>
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Summary
Fixes #1858
Relevant technical choices
OD_URL_Metrics_Post_Type::update_post( string $slug, string $post_title, OD_URL_Metric_Group_Collection $url_metric_group_collection )
to replacestore_url_metric()
, eliminating redundant logic.update_post()
instead ofstore_url_metric()
, ensuring the existingOD_URL_Metric_Group_Collection
is passed directly.store_url_metric()
toOptimization_Detective_Test_Helpers
for test compatibility.