Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
Whey I try to delete products using WP-CLI then products only in default language are deleted. Products in other languages can not be deleted using wp post delete. I use the following command:

wp post delete $(wp wc product list --user=1 --format=ids --per_page=10) --force

Solution:
In order to delete post in all languages this needs to be checked: WPML → Settings → "When deleting a post, delete translations as well"

Relevant Documentation:

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 10 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
August 6, 2023 at 6:06 pm #14160509

robertL-62

Whey I try to delete products using WP-CLI then products only in default language are deleted. Products in other languages can not be deleted using wp post delete. I use the following command:

wp post delete $(wp wc product list --user=1 --format=ids --per_page=10) --force

More information about deleting WooCommerce products using wp-cli can be found there: hidden link

Update:
In order to delete post in all languages this needs to be checked: WPML → Settings → "When deleting a post, delete translations as well"

August 7, 2023 at 10:59 am #14163081

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Robert,

Thank you for contacting the support.

As of your last update, did that option resolve the problem? If yes, please feel free to close this ticket as resolved.

Or let me know and I'll try my best to help you further on the matter.

Regards.