Skip to content

Commit

Permalink
Merge pull request #55 from thinkshout/develop
Browse files Browse the repository at this point in the history
updates version number and adds credentials in code storage
  • Loading branch information
jamacon36 authored May 30, 2024
2 parents f826fea + 045c719 commit 9a0455e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/Otis.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ public function token( $refresh = false ) {
'password' => get_option( WP_OTIS_PASSWORD, '' ),
);

// $params = apply_filters( 'wp_otis_rest_auth', $params );
$credentials_in_code = apply_filters( 'wp_otis_rest_auth', $params );

if ( $credentials_in_code['username'] || $credentials_in_code['password'] ) {
$params = $credentials_in_code;
// Save the credentials to the database.
update_option( WP_OTIS_USERNAME, $params['username'] );
update_option( WP_OTIS_PASSWORD, $params['password'] );
}

if ( ! $params['username'] || ! $params['password'] ) {
throw new Otis_Exception( 'Missing username or password' );
Expand Down
2 changes: 1 addition & 1 deletion wp-otis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author URI: thinkshout.com
* Text Domain: wp-otis
* Domain Path: /languages
* Version: 1.2.4.2
* Version: 1.2.5
*
* @package Otis
*/
Expand Down

0 comments on commit 9a0455e

Please sign in to comment.