update bug report url to work with latest WC versions
This commit is contained in:
parent
6348f0422c
commit
17f8b35d05
|
@ -152,16 +152,20 @@ Copy and paste the system status report from **WooCommerce > System Status** in
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function construct_ssr() {
|
protected function construct_ssr() {
|
||||||
|
if ( version_compare( WC()->version, '3.6', '<' ) ) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
$transient_name = 'wc-beta-tester-ssr';
|
$transient_name = 'wc-beta-tester-ssr';
|
||||||
$ssr = get_transient( $transient_name );
|
$ssr = get_transient( $transient_name );
|
||||||
|
|
||||||
if ( false === $ssr ) {
|
if ( false === $ssr ) {
|
||||||
// When running WC 3.6 or greater it is necessary to manually load the REST API classes.
|
// When running WC 3.6 or greater it is necessary to manually load the REST API classes.
|
||||||
if ( version_compare( WC()->version, '3.6', '>=' ) && ! did_action( 'rest_api_init' ) ) {
|
if ( ! did_action( 'rest_api_init' ) ) {
|
||||||
WC()->api->rest_api_includes();
|
WC()->api->rest_api_includes();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_REST_System_Status_Controller', false ) ) {
|
if ( ! class_exists( 'WC_REST_System_Status_Controller' ) ) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,10 +188,7 @@ Copy and paste the system status report from **WooCommerce > System Status** in
|
||||||
$ssr = '';
|
$ssr = '';
|
||||||
foreach ( $response['environment'] as $key => $value ) {
|
foreach ( $response['environment'] as $key => $value ) {
|
||||||
$index = $key;
|
$index = $key;
|
||||||
// @todo remove this hack after fix schema in WooCommerce, and Claudio never let you folks forget that need to write schema first, and review after every change, schema is the most important part of the REST API.
|
if ( 'external_object_cache' === $index ) {
|
||||||
if ( 'version' === $index ) {
|
|
||||||
$index = 'wc_version';
|
|
||||||
} elseif ( 'external_object_cache' === $index ) {
|
|
||||||
$ssr .= sprintf( "%s: %s\n", 'External object cache', wc_bool_to_string( $value ) );
|
$ssr .= sprintf( "%s: %s\n", 'External object cache', wc_bool_to_string( $value ) );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* Author: WooCommerce
|
* Author: WooCommerce
|
||||||
* Author URI: http://woocommerce.com/
|
* Author URI: http://woocommerce.com/
|
||||||
* Requires at least: 4.4
|
* Requires at least: 4.4
|
||||||
* Tested up to: 4.9
|
* Tested up to: 5.5
|
||||||
* WC requires at least: 3.0.0
|
* WC requires at least: 3.6.0
|
||||||
* WC tested up to: 3.5.0
|
* WC tested up to: 4.6.0
|
||||||
* Text Domain: woocommerce-beta-tester
|
* Text Domain: woocommerce-beta-tester
|
||||||
*
|
*
|
||||||
* @package WC_Beta_Tester
|
* @package WC_Beta_Tester
|
||||||
|
|
Loading…
Reference in New Issue