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
We should wait for the new version of WooCommerce to gain significant adoption before fully migrating to the new endpoint.
A dual-support system will be necessary in the interim, where both the new endpoint and the legacy in-app solution are maintained if we don't want to wait for too long.
We need to determine the criteria for when to switch over to the new endpoint exclusively.
Action Items
[ ] Evaluate the new REST API endpoint for duplicating products.
[ ] Determine the WooCommerce version adoption rate required for migration.
[ ] Implement the new endpoint in the app.
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.
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