YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Customize check period

baddate opened this issue · comments

commented

Can I custom the check period? how?

You can pass a custom check period to the buildUpdateChecker method as the 4th argument, after the slug:

$myUpdateChecker = PucFactory::buildUpdateChecker(
	'https://example.com/path/to/details.json',
	__FILE__, //Full path to the main plugin file or functions.php.
	'unique-plugin-or-theme-slug',
	48 // <-- Check every 48 hours.
);

You could also set it to 0 to disable automatic update checks and then set up your own schedule (e.g. using a cron job) that calls $myUpdateChecker->checkForUpdates().

commented

thanks! i got it.