woocommerce / pinterest-for-woocommerce

A native Pinterest integration for WooCommerce. Development is managed by Ventures.
https://woo.com/products/pinterest-for-woocommerce/
GNU General Public License v3.0
22 stars 9 forks source link

Disconnecting and connecting a different Pinterest account shows XML feed file time generated before disconnecting #962

Open ecgan opened 4 months ago

ecgan commented 4 months ago

Describe the bug:

When we disconnect a Pinterest account, connect a different Pinterest account, and then go to the Catalog page for the first time, the "XML feed" status will show that the feed file is generated successfully "hours ago" - the time here refers to the old feed file that was generated before the account disconnection. See screenshot below. Note that the "feed file" link actually points to the new feed file, not the old feed file, i.e. the link is correct, but the time is incorrect.

Screenshot 2024-03-20 at 9 23 25 PM

After refreshing the page, the time will show correctly:

Screenshot 2024-03-20 at 9 28 19 PM

~Note: it seems that if we uninstall the plugin (which will do some data cleanup based on uninstall.php) before connecting an account, then this issue would not happen.~ Update: this issue may still happen even after uninstalling the plugin.

Steps to reproduce:

  1. Disconnect account, and then connect to a different Pinterest account.
  2. Go to the Catalog page for the first time.

Expected behavior:

The feed file generation time should not be the time before account connection.

Actual behavior:

The feed file generation time is before account connection; it refers to the time when the old feed file is generated before account disconnection.

ecgan commented 4 months ago

Note that the "feed file" link actually points to the new feed file, not the old feed file, i.e. the link is correct, but the time is incorrect.

I just tested again and found new details. Even though the feed file link is "correct", it seems like the file was not generated yet and I saw a 404 page. It is generated a few seconds later and then I can see the file.

Screenshots below - When visiting the Catalog page for the first time, the time is incorrect, the link is correct, but it goes to a 404 page:

image image

After refreshing the Catalog page, the time is correct, the link is correct, and it goes to the XML file:

image image

Note: it seems that if we uninstall the plugin (which will do some data cleanup based on uninstall.php) before connecting an account, then this issue would not happen.

Note that this is incorrect. I uninstalled the plugin and reinstall again, and I can see this issue happening.