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

Add duplicate product docs #244

Merged
merged 3 commits into from
Jun 17, 2024
Merged

Conversation

octaedro
Copy link
Contributor

@octaedro octaedro commented May 31, 2024

Changes proposed in this Pull Request:

The WooCommerce PR woocommerce/woocommerce#46141 added a new REST API endpoint meant to duplicate a product.

This PR adds the documentation necessary for that new endpoint

It adds the documentation under v3 and under wp-api-v3.

How to test the changes in this Pull Request:

  1. Checkout this branch and build the project
sh build.sh
  1. After running the build process, you will see a build folder in your project.
  2. Go to the build folder and open the following files in your browser:
  • ./index.html
  • ./v3.html (updated @mattsherman - our change is only for the WP API, not the legacy API)
  1. Go to Product > Duplicate product in the sidebar.
  2. Verify that the documentation looks correct.

@octaedro octaedro self-assigned this May 31, 2024
Copy link

@mattsherman mattsherman left a comment

Choose a reason for hiding this comment

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

Looks good except that we shouldn't be updating the legacy API docs too.

Ping me when that is removed and I'll re-review/approve!

@@ -1629,6 +1629,115 @@ woocommerce.get("products").parsed_response
<code>tag</code>, <code>shipping_class</code> and <code>pa_*</code> filters are available starting from WooCommerce 2.5.
</aside>

## Duplicate product ##

Choose a reason for hiding this comment

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

This documentation is for the legacy WC API. As such, we shouldn't be updating the doc for this, as our change is for the non-legacy WP REST API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in the commit b8345d7

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattsherman Could you take another look at this PR?

@octaedro octaedro requested a review from mattsherman June 17, 2024 20:03
Copy link

@mattsherman mattsherman left a comment

Choose a reason for hiding this comment

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

Thanks for adding this documentation @octaedro !

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.

2 participants