Skip to content
Snippets Groups Projects
Commit 4d23ff00 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

V1.3.7debug: Add debug output for the update credentials issues

parent ee9c21b9
Branches
Tags
No related merge requests found
BASE=ordernumbers
PLATTFORM=woocommerce
VENDOR=opentools
VERSION=1.3.7
VERSION=1.3.7debug
DIR = $(shell pwd)
SVNDIR=wordpress-plugin-svn
......
......@@ -23,7 +23,7 @@ class OpenToolsPluginUpdateChecker extends PluginUpdateChecker_2_1 {
public function __construct($metadataUrl, $pluginFile, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '')
{
parent::__construct($metadataUrl, $pluginFile, $slug, $checkPeriod, $optionName, $muPluginFile);
// $this->debugMode = true;
$this->debugMode = TRUE;
$this->installOTHooks();
}
public function declareCredentials($credential_def) {
......@@ -250,6 +250,9 @@ class OpenToolsPluginUpdateChecker extends PluginUpdateChecker_2_1 {
$success = ($status_code==200);
} else {
$message = __('Unable to access plugin download URL. Please check your credentials.');
if ($this->debugMode) {
$message .= "<pre>updateinfo: ".print_r($updateinfo,1)."</pre>";
}
}
return $success;
}
......
File added
File added
......@@ -221,7 +221,7 @@ class PluginUpdateChecker_2_1 {
);
//Try to parse the response
$pluginInfo = null;
$pluginInfo = new stdClass();
if ( !is_wp_error($result) && isset($result['response']['code']) && ($result['response']['code'] == 200) && !empty($result['body']) ){
$pluginInfo = PluginInfo_2_1::fromJson($result['body'], $this->debugMode);
$pluginInfo->filename = $this->pluginFile;
......@@ -236,6 +236,7 @@ class PluginUpdateChecker_2_1 {
$message .= "wp_remote_get() returned an unexpected result.";
}
trigger_error($message, E_USER_WARNING);
$pluginInfo->response = $result;
}
$pluginInfo = apply_filters('puc_request_info_result-'.$this->slug, $pluginInfo, $result);
......
......@@ -3,7 +3,7 @@
* Plugin Name: Woocommerce Advanced Ordernumbers
* Plugin URI: http://open-tools.net/woocommerce/advanced-ordernumbers-for-woocommerce.html
* Description: Lets the user freely configure the order numbers in WooCommerce.
* Version: 1.3.7
* Version: 1.3.7debug
* Author: Open Tools
* Author URI: http://open-tools.net
* Text Domain: woocommerce-advanced-ordernumbers
......
......@@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Basic Ordernumbers
* Plugin URI: http://open-tools.net/woocommerce/advanced-ordernumbers-for-woocommerce.html
* Description: Configure WooCommerce ordernumbers to have a running counter and arbitrary, fixed text (prefix / postfix).
* Version: 1.3.7
* Version: 1.3.7debug
* Author: Open Tools
* Author URI: http://open-tools.net
* Text Domain: woocommerce-advanced-ordernumbers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment