woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
276 stars 134 forks source link

Integrate the new REST API endpoint for duplicating products #11324

Open pmusolino opened 5 months ago

pmusolino commented 5 months ago

Overview

A new REST API endpoint has been added to WooCommerce for duplicating products as per the PR https://github.com/woocommerce/woocommerce/pull/46141. This feature could potentially replace our current in-app solution for duplicating products and may offer a more reliable approach, especially when dealing with variable products and their variations.

Current Challenge

The current in-app solution for duplicating products has limitations when it comes to paginating all the variations to duplicate variable products. The new REST API endpoint could simplify this process.

Proposed Solution

We should evaluate the new REST API endpoint and consider migrating to it. However, this will require users to be on the latest version of WooCommerce where this endpoint is available. We will need eventually to maintain the old solution as a fallback and implement logic in the app to decide which endpoint to use based on the WooCommerce version running on the server.

Considerations

Action Items

Additional Context

This issue was raised here peaMlT-yX. The new REST API endpoint does not introduce breaking changes to the app but offers an enhancement opportunity that we should track and consider for future releases.

Issue on iOS: https://github.com/woocommerce/woocommerce-ios/issues/12486

dangermattic commented 5 months ago

Thanks for reporting! 👍