Codeinwp / tweet-old-post

Plugin to tweet about your old posts to get more hits for them and keep them alive.
GNU General Public License v2.0
13 stars 16 forks source link

fix: maintain backwards compatibility #995

Closed Soare-Robert-Daniel closed 2 months ago

Soare-Robert-Daniel commented 2 months ago

Summary

Add backward compatibility for webhook services.

Instead of being saved in rop_data.services, they will be saved in rop_data.services_webhooks! (same thing for active accounts)

The set and get functions have been modified to ensure that pulling and saving the data are the same for the whole program, even if the data is from two different sources.

[!NOTE] THe way we merge the data is by making the webhooks always appear first in the Dashboard. If this bothers someone, the accounts can be sorted by the creation date.

Testing

Use the build from this PR together with https://github.com/Codeinwp/tweet-old-post-pro/pull/537

  1. Add a webhook.
  2. Switch to the current ROP version.
  3. No crash should happen.
pirate-bot commented 2 months ago

Plugin build for 7dab8dec3f832d0a0023fe8cbb38fa31958a4911 is ready :bellhop_bell:!