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.
MIT License
2.21k
stars
403
forks
source link
My Plugin Has Update. but WP shows it's up-to-date #556
$updateChecker = PucFactory::buildUpdateChecker(
'https://github.com/AP-Totalogistix/YB_WooCommerce_Plugin/', // The exact URL to your GitHub repository
FILE, // Full path to the main plugin file
'WP_YB_WooCommercePlugin' // Unique slug. If your plugin is hosted on WordPress.org, this should match your WordPress.org plugin's slug.
);
<?php / Plugin Name: ShipSmart TMS Plugin Plugin URI: https://shipsmarttms.com/ Description: Rates from ShipSmart TMS Version: 1.0.0 Author: Aptean Author URI: https://shipsmarttms.com/ / require 'plugin-update-checker/plugin-update-checker.php'; use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
$updateChecker = PucFactory::buildUpdateChecker( 'https://github.com/AP-Totalogistix/YB_WooCommerce_Plugin/', // The exact URL to your GitHub repository FILE, // Full path to the main plugin file 'WP_YB_WooCommercePlugin' // Unique slug. If your plugin is hosted on WordPress.org, this should match your WordPress.org plugin's slug. );
$updateChecker->setAuthentication('ghp_*****');
$updateChecker->setBranch('master');