Skip to content
This repository was archived by the owner on Oct 4, 2019. It is now read-only.

Commit 1dc3571

Browse files
author
Justin Shreve
authored
Revert "Return in the system status report if a site has run the setup wizard (#24)" (#25)
This reverts commit 394c65b.
1 parent 394c65b commit 1dc3571

File tree

4 files changed

+3
-37
lines changed

4 files changed

+3
-37
lines changed

api/class-wc-rest-dev-system-status-controller.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,4 @@ class WC_REST_Dev_System_Status_Controller extends WC_REST_System_Status_Control
2626
*/
2727
protected $namespace = 'wc/v3';
2828

29-
/**
30-
* Returns setting values for the site that are useful for debugging
31-
* purposes. For full settings access, use the settings api.
32-
*
33-
* @return array
34-
*/
35-
public function get_settings() {
36-
$settings = parent::get_settings();
37-
$settings_extra = array();
38-
$admin_notices = get_option( 'woocommerce_admin_notices', array() );
39-
40-
$settings_extra['setup_wizard_ran'] = ! ( in_array( 'install', $admin_notices ) );
41-
42-
return array_merge( $settings, $settings_extra );
43-
}
44-
4529
}

readme.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: automattic, woothemes
33
Tags: woocommerce, rest-api, api
44
Requires at least: 4.6
55
Tested up to: 4.8
6-
Stable tag: 0.7.0
6+
Stable tag: 0.6.0
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -25,9 +25,6 @@ This section describes how to install the plugin and get it working.
2525

2626
== Changelog ==
2727

28-
= 0.7.0 =
29-
* Return in the system status report if a store has gone through the setup wizard before
30-
3128
= 0.6.0 =
3229
* Fix value default return on settings endpoints
3330
* Fix broken variation image set

tests/unit-tests/system-status.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -147,29 +147,14 @@ public function test_get_system_status_info_settings() {
147147
$term_response[ $term->slug ] = strtolower( $term->name );
148148
}
149149

150-
$notices = WC_Admin_Notices::get_notices();
151-
$install_key = array_search( 'install', $notices );
152-
unset( $notices[ $install_key ] );
153-
update_option( 'woocommerce_admin_notices', $notices );
154-
155150
$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v3/system_status' ) );
156151
$data = $response->get_data();
157152
$settings = (array) $data['settings'];
158153

159-
$this->assertEquals( 12, count( $settings ) );
154+
$this->assertEquals( 11, count( $settings ) );
160155
$this->assertEquals( ( 'yes' === get_option( 'woocommerce_api_enabled' ) ), $settings['api_enabled'] );
161156
$this->assertEquals( get_woocommerce_currency(), $settings['currency'] );
162157
$this->assertEquals( $term_response, $settings['taxonomies'] );
163-
$this->assertEquals( true, $settings['setup_wizard_ran'] );
164-
165-
$notices[] = 'install';
166-
update_option( 'woocommerce_admin_notices', $notices );
167-
168-
$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v3/system_status' ) );
169-
$data = $response->get_data();
170-
$settings = (array) $data['settings'];
171-
172-
$this->assertEquals( false, $settings['setup_wizard_ran'] );
173158
}
174159

175160
/**

wc-api-dev.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: WooCommerce API Dev
44
* Plugin URI: https://woocommerce.com/
55
* Description: A feature plugin providing a bleeding edge version of the WooCommerce REST API.
6-
* Version: 0.7.0
6+
* Version: 0.6.0
77
* Author: Automattic
88
* Author URI: https://woocommerce.com
99
* Requires at least: 4.4

0 commit comments

Comments
 (0)