3

I am trying to use pre_set_site_transient_update_plugins to update my plugin from a GitHub repository.

For that I am using this example. On my Dev-System (MAMP for Mac Version 2.2) everything is fine. It gets the latest Version and shows me the update notification.

When I publish it to my Live System wich is a hosted webspace package. I don’t get the Update Notification. Even after waiting 12 hours or using ?force-check=1

What I already did was to create a simple Plugin that logs a string to the wordpress log when pre_set_site_transient_update_plugins is called. Again on my Dev-system it works, but not Live. So I think it has something to do with the PHP configuration.

Does anyone has an idea which setting could prevent this filter from beeing executed?

3
  • 1
    can you post code?
    – Tom J Nowell
    May 13, 2014 at 12:43
  • Are you logging errors?
    – s_ha_dum
    May 13, 2014 at 13:43
  • I checked the logs and I could not find any errors. That ist the little plugin I wrote to check it. <?php /** * Plugin Name: pre_set_site_transient_update_plugins test * Description: pre_set_site_transient_update_plugins test * Version: 0.1.1 */ add_filter( "pre_set_site_transient_update_plugins", "echo_test" ); function echo_test(){ error_log("pre_set_site_transient_update_plugins is triggered"); }
    – Tim
    May 13, 2014 at 14:24

2 Answers 2

0

Sorry for my late answer, but I found the solution for my problem.

My Code was fine, also my small Test-Plugin. The problem is with the caching of my hosting provider. They are caching the Database requests and it took some time for the updater to recognize that the plugin is updated.

0

You're using an old library and it looks like it relies on transient to check an/or update your plugins. This shouldn't be the case because transients are meant to store/cache temporary data.

I recommend using a more robust and mature library which we use at our company: Plugin Update Checker, see https://github.com/YahnisElsts/plugin-update-checker

It has also an option to force check if there are any updates. This library is really flexible, you could use this for .org, github, BitBucket, GitLab and your own server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.