Skip to content

Commit

Permalink
Replaced old updater service with the new WPE Updater service. fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmurphy committed Feb 6, 2025
1 parent fcca872 commit 5030805
Show file tree
Hide file tree
Showing 7 changed files with 284 additions and 339 deletions.
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.

19 changes: 19 additions & 0 deletions includes/Updates/CheckForUpgrades.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

namespace WPGraphQL\ContentBlocks\Updates;

if (! function_exists('wp_graphql_content_blocks_check_for_upgrades')) {
function wp_graphql_content_blocks_check_for_upgrades() {

Check failure on line 8 in includes/Updates/CheckForUpgrades.php

View workflow job for this annotation

GitHub Actions / phpstan

Function WPGraphQL\ContentBlocks\Updates\wp_graphql_content_blocks_check_for_upgrades() has no return type specified.
$properties = array(
'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

0 comments on commit 5030805

Please sign in to comment.