Skip to content

Commit

Permalink
Update more links
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Mar 20, 2024
1 parent c876a17 commit 614d695
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/src/Commands/Partner/AddPartner.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct( ManagerBackend $manager_backend, Cache $cache, Auth
protected function configure() {
$this
->setDescription( 'Configure a new WCCOM Marketplace Partner that the QIT CLI can connect to.' )
->setHelp( sprintf( "Configure the QIT CLI to be able to interact with %s on behalf of a given partner.\nAuthenticating documentation: https://woocommerce.github.io/qit-documentation/#/authenticating", get_wccom_url() ) )
->setHelp( sprintf( "Configure the QIT CLI to be able to interact with %s on behalf of a given partner.\nAuthenticating documentation: https://qit.woo.com/docs/support/authenticating", get_wccom_url() ) )
->addOption( 'user', 'u', InputOption::VALUE_OPTIONAL, '(Optional) Woo.com Partner Developer username.' )
->addOption( 'qit_token', 't', InputOption::VALUE_OPTIONAL, '(Optional) Woo.com Partner Developer QIT Token.' )
->addOption( 'application_password', 'p', InputOption::VALUE_OPTIONAL, '(DEPRECATED) This has been renamed to "QIT Token" and will be removed. A regular application password will not work.' );
Expand Down Expand Up @@ -95,11 +95,11 @@ protected function execute( InputInterface $input, OutputInterface $output ): in

$question->setValidator( function ( $qit_token ) {
if ( empty( $qit_token ) ) {
throw new \RuntimeException( 'Invalid QIT Token. Questions? https://woocommerce.github.io/qit-documentation/#/authenticating' );
throw new \RuntimeException( 'Invalid QIT Token. Questions? https://qit.woo.com/docs/support/authenticating' );
}

if ( ! preg_match( '#^[a-z0-9 ]+$#i', $qit_token ) ) {
throw new \RuntimeException( 'A QIT Token should consist of alpha-numeric characters and spaces. Questions? https://woocommerce.github.io/qit-documentation/#/authenticating' );
throw new \RuntimeException( 'A QIT Token should consist of alpha-numeric characters and spaces. Questions? https://qit.woo.com/docs/support/authenticating' );
}

return $qit_token;
Expand All @@ -117,7 +117,7 @@ protected function execute( InputInterface $input, OutputInterface $output ): in
$user = strtolower( $user );

if ( ! filter_var( $user, FILTER_VALIDATE_EMAIL ) && ! preg_match( '#^[a-z0-9_-]{1,70}$#i', $user ) ) {
throw new \InvalidArgumentException( 'The username must be either a valid e-mail, or contain only letters, numbers, underscores or dashes. Questions? https://woocommerce.github.io/qit-documentation/#/authenticating' );
throw new \InvalidArgumentException( 'The username must be either a valid e-mail, or contain only letters, numbers, underscores or dashes. Questions? https://qit.woo.com/docs/support/authenticating' );
}

// Remove any non-alphanumeric characters from the username.
Expand Down Expand Up @@ -159,8 +159,8 @@ protected function execute( InputInterface $input, OutputInterface $output ): in
$io->section( <<<SECTION
Getting Started:
Documentation: https://woocommerce.github.io/qit-documentation/
Running Tests: https://woocommerce.github.io/qit-documentation/#/cli/running-tests
Documentation: https://qit.woo.com/docs/
Running Tests: https://qit.woo.com/docs/cli/running-tests
SECTION
);

Expand Down
2 changes: 1 addition & 1 deletion src/src/ManagerSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function enforce_latest_version(): void {

$this->output->writeln( sprintf( "<bg=red;fg=white>Current version: %s</>\n<bg=red;fg=white;options=bold>Latest version: %s</>", $current_version, $latest_version ) );
$this->output->writeln( "\nUpdate today to take advantage of the latest features!" );
$this->output->writeln( "How to update: https://woocommerce.github.io/qit-documentation/#/cli/getting-started?id=updating-qit\n" );
$this->output->writeln( "How to update: https://qit.woo.com/docs/cli/getting-started#updating-qit\n" );
if ( version_compare( $current_version, $minimum_cli_version, '<' ) ) {
if ( ! Config::is_development_mode() ) {
$this->output->writeln( sprintf( '<error>You are using an outdated version of the CLI. Please update to the latest version (%s).</error>', $latest_version ) );
Expand Down
2 changes: 1 addition & 1 deletion src/src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function validate_authentication( string $username, string $qit_token ): void {
] )
->request();
} catch ( \Exception $e ) {
throw new \Exception( sprintf( 'Could not authenticate to %s using the provided username and QIT Token. Questions? https://woocommerce.github.io/qit-documentation/#/authenticating', get_wccom_url() ) );
throw new \Exception( sprintf( 'Could not authenticate to %s using the provided username and QIT Token. Questions? https://qit.woo.com/docs/support/authenticating', get_wccom_url() ) );
}
}

Expand Down

0 comments on commit 614d695

Please sign in to comment.