Skip to content

Enhancement/12780 follow up change#12846

Merged
eugene-manuilov merged 13 commits into
developfrom
enhancement/12780-follow-up-change
Jun 8, 2026
Merged

Enhancement/12780 follow up change#12846
eugene-manuilov merged 13 commits into
developfrom
enhancement/12780-follow-up-change

Conversation

@zutigrm

@zutigrm zutigrm commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🤖 This comment is automatically updated by CI workflows. Each section is managed independently.

📦 Build files for b9d6509:

  • Build files have been deleted.

🎭 Playwright reports for b9d6509:

  • Reports have been deleted.

@eugene-manuilov eugene-manuilov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @zutigrm. PR looks very good. There is just one tiny comment that we need to address before merging this.

Comment on lines +224 to +228
$datapoint_permission_callback = function ( WP_REST_Request $request, $method, callable $default_callback ) {
try {
$module = $this->modules->get_module( $request['slug'] );
$datapoint = $module->get_datapoint_definition( "{$method}:{$request['datapoint']}" );
} catch ( Exception $e ) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We don't need the $method parameter because we can get it by calling $request->get_method()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point, thanks. PR updated

@eugene-manuilov eugene-manuilov merged commit 725da8b into develop Jun 8, 2026
34 checks passed
@eugene-manuilov eugene-manuilov deleted the enhancement/12780-follow-up-change branch June 8, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants