* @return object an object with the update information. */ public function checkForUpdates() { $args = [ 'license' => $this->key, 'domain' => aioseo()->helpers->getSiteDomain(), 'sku' => $this->pluginSlug, 'version' => $this->version, 'php_version' => PHP_VERSION, 'wp_version' => get_bloginfo( 'version' ) ]; return aioseo()->helpers->sendRequest( $this->getUrl() . 'update/', $args ); } /** * Filter the plugins_api function to get our own custom plugin information * from our private repo. * * @since 4.0.0 * * @param object $api The original plugins_api object. * @param string $action The action sent by plugins_api. * @param object $args Additional args to send to plugins_api. * @return object New stdClass with plugin information on success, default response on failure. */ public function pluginsApi( $api, $action = '', $args = null ) { $plugin = ( 'plugin_information' === $action ) && isset( $args->slug ) && ( $this->pluginSlug === $args->slug ); // If our plugin matches the request, set our own plugin data, else return the default response. if ( $plugin ) { return $this->setPluginsApi( $api ); } return $api; } /** * Ping a remote API to retrieve plugin information for WordPress to display. * * @since 4.0.0 * * @param object $defaultApi The default API object. * @return object Return custom plugin information to plugins_api. */ public function setPluginsApi( $defaultApi ) { // Perform the remote request to retrieve our plugin information. If it fails, return the default object. if ( ! $this->info ) { $response = aioseo()->helpers->sendRequest( $this->getUrl() . 'info/', [ 'license' => $this->key, 'domain' => aioseo()->helpers->getSiteDomain(), 'sku' => $this->pluginSlug, 'version' => $this->version, 'php_version' => PHP_VERSION, 'wp_version' => get_bloginfo( 'version' ) ] ); if ( empty( $response ) || property_exists( $response, 'error' ) ) { $this->info = false; return $defaultApi; } $this->info = $response; } // Create a new stdClass object and populate it with our plugin information. $api = new \stdClass(); $api->name = $this->info->name ?? ''; $api->slug = $this->info->slug ?? ''; $api->version = $this->info->version ?? ''; $api->author = $this->info->author ?? ''; $api->author_profile = $this->info->author_profile ?? ''; $api->requires = $this->info->requires ?? ''; $api->tested = $this->info->tested ?? ''; $api->last_updated = $this->info->last_updated ?? ''; $api->homepage = $this->info->homepage ?? ''; $api->sections['description'] = $this->info->description ?? ''; $api->sections['changelog'] = $this->info->changelog ?? ''; $api->download_link = $this->info->download_link ?? ''; $api->active_installs = $this->info->active_installs ?? ''; $api->banners = isset( $this->info->banners ) ? (array) $this->info->banners : ''; // Return the new API object with our custom data. return $api; } /** * Get the URL to check licenses. * * @since 4.0.0 * * @return string The URL. */ public function getUrl() { if ( defined( 'AIOSEO_LICENSING_URL' ) ) { return AIOSEO_LICENSING_URL; } return $this->baseUrl; } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Pro\Admin\Updates" not found in /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/Pro/Admin/Admin.php:136 Stack trace: #0 /home/valigeria/public_html/wp-includes/class-wp-hook.php(324): AIOSEO\Plugin\Pro\Admin\Admin->loadUpdates('') #1 /home/valigeria/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #2 /home/valigeria/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /home/valigeria/public_html/wp-settings.php(550): do_action('plugins_loaded') #4 /home/valigeria/public_html/wp-config.php(111): require_once('/home/valigeria...') #5 /home/valigeria/public_html/wp-load.php(50): require_once('/home/valigeria...') #6 /home/valigeria/public_html/wp-blog-header.php(13): require_once('/home/valigeria...') #7 /home/valigeria/public_html/index.php(17): require('/home/valigeria...') #8 {main} thrown in /home/valigeria/public_html/wp-content/plugins/all-in-one-seo-pack-pro/app/Pro/Admin/Admin.php on line 136