Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Replacing Plugin Updater Service #341

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/witty-falcons-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@wpengine/wp-graphql-content-blocks": minor
---

Replaced old plugin service to use the WPE updater service for checking for updates. The new API endpoint will be https://wpe-plugin-updates.wpengine.com/wp-graphql-content-blocks/info.json

183 changes: 0 additions & 183 deletions includes/PluginUpdater/UpdateCallbacks.php

This file was deleted.

154 changes: 0 additions & 154 deletions includes/PluginUpdater/UpdateFunctions.php

This file was deleted.

27 changes: 27 additions & 0 deletions includes/Updates/CheckForUpgrades.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/**
* Plugin upgrade checker
*
* @package WPGraphQL\ContentBlocks\Updates
*/

declare(strict_types=1);

namespace WPGraphQL\ContentBlocks\Updates;

if ( ! function_exists( 'wp_graphql_content_blocks_check_for_upgrades' ) ) {
/**
* Checks for plugin upgrades
*/
function wp_graphql_content_blocks_check_for_upgrades(): void {
$properties = [
'plugin_slug' => 'wp-graphql-content-blocks',
'plugin_basename' => WPGRAPHQL_CONTENT_BLOCKS_PLUGIN_PATH,
];

require_once __DIR__ . '/PluginUpdater.php';
new PluginUpdater( $properties );
}

add_action( 'admin_init', __NAMESPACE__ . '\wp_graphql_content_blocks_check_for_upgrades' );
}
Loading
Loading