Skip to content

Conversation

@moon0326
Copy link
Contributor

Changes proposed in this Pull Request:

Closes #38408 .

This PR adds obw/core-profiler entry to the free-extensions endpoint. In addition to the new obw/core-profiler, it also includes the following changes.

  1. Added name field to all plugins.
  2. Added an icon for jetpack and woocommerce-services

I'll work on WCCOM changes as well.

How to test the changes in this Pull Request:

  1. Make sure woocommerce_show_marketplace_suggestions is set to no
  2. Change this line to return true
  3. Using curl or Postman, access /wp-json/wc-admin/onboarding/free-extensions
  4. The response should have obw/core-profiler
  5. Install and activate one of the plugins from obw/core-profiler
  6. Access the endpoint again
  7. Confirm the plugin is still included in obw/core-profiler

moon added 2 commits May 23, 2023 19:29
* Added name fields to all plugins

* Added icons for jetpack and woocommercer-services
@moon0326 moon0326 requested review from a team, adrianduffell and chihsuan May 24, 2023 02:35
@github-actions github-actions bot added focus: react admin [team:Ghidorah] plugin: woocommerce Issues related to the WooCommerce Core plugin. labels May 24, 2023
@github-actions
Copy link
Contributor

Hi @chihsuan, @adrianduffell, @woocommerce/ghidorah

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2023

Test Results Summary

Commit SHA: 382d253

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests26700202691m 16s
E2E Tests1940010020416m 3s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

return $plugin;
}

public static function withCoreProfilerFields( $plugins ) {
Copy link
Member

Choose a reason for hiding this comment

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

Some linting error here. 🥲

FOUND 3 ERRORS AND 0 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------
 814 | ERROR | Method name "withCoreProfilerFields" in class DefaultFreeExtensions is not in snake case format, try "with_core_profiler_fields" (WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid)
 814 | ERROR | Missing doc comment for function withCoreProfilerFields() (Squiz.Commenting.FunctionComment.Missing)
 869 | ERROR | Use Yoda Condition checks, you must. (WordPress.PHP.YodaConditions.NotYoda)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 382d253

Copy link
Member

@chihsuan chihsuan left a comment

Choose a reason for hiding this comment

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

Nice, LGTM and tested well. 🚢

@moon0326 moon0326 merged commit 2f6ff0f into trunk May 25, 2023
@moon0326 moon0326 deleted the update/38408-update-free-extensions-for-core-profiler branch May 25, 2023 20:20
@github-actions github-actions bot added this to the 7.9.0 milestone May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Core Profiler - Update free-extensions endpoint data

2 participants