Last active
February 1, 2021 17:49
-
-
Save tivnet/b122c4309cee549db144f7e4b9e71b93 to your computer and use it in GitHub Desktop.
WooCommerce API Manager: Fix 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// plugins/woocommerce-api-manager/includes/class-wc-am-update-api.php | |
// Add `$response->tested` to show "100% compatible" on the Updates page. | |
case 'pluginupdatecheck': | |
$response->id = $post_id; | |
$response->slug = ! empty( $this->slug ) ? $this->slug : $slug; | |
$response->plugin = $plugin_name; | |
$response->new_version = $api_data[ '_api_new_version' ]; | |
$response->url = $api_data[ '_api_plugin_url' ]; | |
// Add this line: | |
$response->tested = $api_data[ '_api_tested_up_to' ]; | |
$response->package = $download_link; | |
break; | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We're having a similar problem. Basically when you go to the update page in WP, it says it's compatibility is "Unknown" so we edited the code to make it say that it is 100% compatible with current version of WordPress in order to get plugins updates to push out and work. I don't like having to modifying the API code, but we needed it working and spent hours playing with it.