Import new products as drafts

Set newly imported products' post_status field to 'draft' instead of to 'publish'. Only applies to products being imported for the first time, not to already imported products.

1

Create a custom plugin

If you haven't done so already, create a custom plugin.

2

Add custom code

Add the following custom code to your custom plugin:

If you have applied this code (recommended), then add the following:

add_filter( 'dfrpswc_post_status', function ( $status, Dfrpswc_Product_Update_Handler $updater ) {
	return ( $updater->action === 'update' ) ? $updater->wc_product->get_status() : 'draft';
}, 10, 2 );
	
3

Save

Save your custom plugin file.

Now the next time your Product Set updates, any new products added to your site will be imported as drafts instead of being automatically published.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us