Skip to content

Commit 5cb0799

Browse files
committed
fix fetching settings for the api key
1 parent 64c251b commit 5cb0799

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

plugin/init.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ function wpcloud_get_api_key(): string {
4949

5050
$api_key = apply_filters( 'wpcloud_api_key', $api_key );
5151

52-
if ( ! empty( $api_key ) ) {
52+
if ( $api_key ) {
5353
return $api_key;
5454
}
55-
5655
// Else check the local options.
57-
$options = get_option( 'wpcloud_options' ) ?? array();
58-
return $options['wpcloud_api_key'] ?? '';
56+
$settings = get_option( 'wpcloud_settings', array() );
57+
return $settings['wpcloud_api_key'] ?? '';
5958
}
6059

6160
/**

plugin/wpcloud-station.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Author URI: https://wp.cloud/
88
* Text Domain: wpcloud
99
* Domain Path: /languages
10-
* Version: 1.0.0
10+
* Version: 1.0.0-beta.1
1111
*
1212
* @package wpcloud-station
1313
*/

0 commit comments

Comments
 (0)