Title: Wishlist ShortCode not working
Last modified: September 28, 2020

---

# Wishlist ShortCode not working

 *  Resolved [manishb510](https://wordpress.org/support/users/manishb510/)
 * (@manishb510)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/)
 * Hey TI Wishlist Support team,
    I am facing a weird problem, I have used your 
   Wishlist plugin shortcode “**[ti_wishlists_addtowishlist product_id=”999″ variation_id
   =”0″]**” in homepage New Products Loop block and Its not working there. But the
   same shortcode is working for shop pages, category pages with the same shortcode.
   I inspected the html output of the page where this shortcode is used and I can
   see that its capturing the correct product ID, But still for homepage, its not
   working. I have already set **Custom Position with code** but still getting the
   same issue.
 * Can you explain why its not working?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwishlist-shortcode-not-working-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * (@templateinvaders)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13466828)
 * Hi [@manishb510](https://wordpress.org/support/users/manishb510/)
 * We’ve checked your issue. Al buttons work as should. The issue produced by page
   caching. You need to exclude the wishlist page slug from the cache at all (some
   rule like /wishlist*). Because LiteSpeed making a private cache for each user
   and the wishlist table doesn’t update while we can see correct wishlist products
   data in AJAX response.
 *  Thread Starter [manishb510](https://wordpress.org/support/users/manishb510/)
 * (@manishb510)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13467210)
 * No, you didn’t check it because by default you can’t view the “**Add to wishlist
   button**” because that is only displayed for logged in user. So Please watch 
   below video and it will explain you all issues. and I also disabled the Caching
   plugin, and disabled it from WP-Config file. and tested in Private window but
   it doesn’t work for homepage products, But same shortcode work for Products shop
   page and also for products archive pages.
 * If you want, I can share you the login credentials so that you can test.
 * Please watch the video for proper understanding.
    [https://www.loom.com/share/ee204524d81e4705aa76e3bff3bf7767](https://www.loom.com/share/ee204524d81e4705aa76e3bff3bf7767)
 *  Plugin Author [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * (@templateinvaders)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13467362)
 * Hi [@manishb510](https://wordpress.org/support/users/manishb510/)
 * We’ve registered on your website to test the issue (you can find a new customer
   with the full name “test test”).
 * Just checked it again and see the next issues:
    1. It looks like you have changed
   the mentioned homepage loop. Now it shows buttons for guests but hidden for logged
   in users. 2. Wishlist page is always empty and we can’t see any cache hit records
   on page response headers now. So it looks like a disabled cache. 3. We still 
   can see correct wishlist products data on the session value while the wishlist
   page is empty. The wishlist data updates also after adding more products to the
   wishlist. The heart icon marked as added correctly also.
 * So the wishlist table page doesn’t work for us at all. The add to wishlist buttons
   works as should from any instance. Products updates in the wishlist table of 
   the database also. You can check the response on add to wishlist request via 
   the browser devtool network tab.
 * If you can provide staging access to your website we can do debugging. You can
   drop us all details via the form on our website.
 *  Thread Starter [manishb510](https://wordpress.org/support/users/manishb510/)
 * (@manishb510)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13468176)
 * On your same account that you created for testing, I have enabled it with admin
   access. So now you can access the admin options.
 * So Please debug the issue and help me to fix the issue. Its really urgent
 *  Plugin Author [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * (@templateinvaders)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13470738)
 * Hi [@manishb510](https://wordpress.org/support/users/manishb510/)
 * Thanks for the reply. We got the clone of your website for local debugging and
   post results ASAP.
 *  Thread Starter [manishb510](https://wordpress.org/support/users/manishb510/)
 * (@manishb510)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13471852)
 * Okay, Please debug, but temporarily I have removed your plugin and installed 
   yith wishlist which works really good for me. But you still need to fix because
   if it will work then I will revert back. Because I like TI Wishlist more than
   Yith. So fix it as soon as possible, Because I am running out of time.
 *  Plugin Author [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * (@templateinvaders)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13472044)
 * We finished debugging and found the problem.
 * Your WooCommerce products incorrectly imported. Most of them missed a product
   type value in the database. As we can see only 349 of 3400 products with correct
   product types in the database.
 * Our plugin using the default WooCommerce method wc_get_products() to get products
   loop data on the wishlist table. This method is designed for better performance
   and utilizes a single database query but has product validations like checking
   product type, etc. So it much faster than get individual product data for each
   product in a loop. It’s the best practice in a similar case and a lot of plugins/
   themes using it.
 * You can ease check the issue in the next steps:
    1. Add to wishlist any product
   from your “New products” loop. Check if it will not appear on the wishlist page.
   2. Go to the dashboard and edit this product. You can see that product type select
   display option “Simple product” but it’s because the database value is empty 
   and it’s the first option on select. Just click the Publish button on the edit
   screen. 3. Go to the wishlist page and see that updated product appears because
   product type added to the database.
 * In total:
    – it’s not our plugin bug and we don’t want to change the used default
   method because of worse performance of any alternative; – your setup could make
   issues for any other plugin/theme
 * We hope the information above will help you to fix your setup.
 *  Thread Starter [manishb510](https://wordpress.org/support/users/manishb510/)
 * (@manishb510)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13472132)
 * Okay, But Why Yith Wishlist is working without any issue? Is there any specific
   change can be done for my site Only using any custom function that you recommend?
 * Please let me know if it’s possible.? All of my products are just simple products
   without any variation. So pretty simple things. And I think it should work with
   any small tweak.
 * Let me know if there is any possibility Because I can’t update all these products
   now.
 *  Plugin Author [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * (@templateinvaders)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13472529)
 * Hi [@manishb510](https://wordpress.org/support/users/manishb510/)
 * The YITH Wishlist works because it loads products data in the loop by separate
   DB requests (some method like wc_get_product()).
 * In any way, as mentioned above your setup could produce other issues with missed
   data in the database.
 * You can bulk update products directly in the database.
 * You can check the next snippet that must work in your case and set all incorrect
   products to simple type:
    [https://gist.github.com/doozy/ded30b2362383e6a0cdb2a0f78625f93](https://gist.github.com/doozy/ded30b2362383e6a0cdb2a0f78625f93)
 * IMPORTANT:
    – full database backup required before running the snippet; – we 
   are not responsible for any corrupted data after using the snippet from the link
   above.
 *  Plugin Author [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * (@templateinvaders)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13484141)
 * Hi [@manishb510](https://wordpress.org/support/users/manishb510/)
 * As we can see you solved your issue and switched back to our plugin.
 * We would very much appreciate it if you could quickly rate the plugin, just to
   help us spread the word.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Wishlist ShortCode not working’ is closed to new replies.

 * ![](https://ps.w.org/ti-woocommerce-wishlist/assets/icon-256x256.gif?rev=2469447)
 * [TI WooCommerce Wishlist](https://wordpress.org/plugins/ti-woocommerce-wishlist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ti-woocommerce-wishlist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ti-woocommerce-wishlist/)
 * [Active Topics](https://wordpress.org/support/plugin/ti-woocommerce-wishlist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ti-woocommerce-wishlist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ti-woocommerce-wishlist/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [templateinvaders](https://wordpress.org/support/users/templateinvaders/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/wishlist-shortcode-not-working-4/#post-13484141)
 * Status: resolved