All products imported with the name "Product"

If all of your products are imported with the name "Product", this article explains what is happening and how to resolve it.

When the Product Sets plugin imports your products, it first creates a "placeholder" Product which we can reference through the rest of the process. However, if you have some very strong caching in place (Redis, Memcache, etc...) then our attempts to update that "placeholder" product fails and your product gets imported as "Product".

To resolve this, we need to clear the Product cache after the entire product addition is complete.

Here's how:

1. First, if you haven't already, create a Custom Plugin.

2. Then add the following code to your Custom Plugin:

add_action( 'dfrpswc_pre_save_product', function ( Dfrpswc_Product_Update_Handler $updater ) {
   wp_suspend_cache_addition( true );
} );

add_action( 'dfrpswc_post_save_product', function ( Dfrpswc_Product_Update_Handler $updater ) {
   wp_suspend_cache_addition( false );
   wp_suspend_cache_invalidation( false );
   clean_post_cache( $updater->post['ID'] );
} );

Now, you just need to "Bump" your Product Sets and the products will be updated with the correct name and information.

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