| 1 |
<?php |
| 2 |
|
| 3 |
namespace Hostinger\Admin\Onboarding\Steps; |
| 4 |
|
| 5 |
defined( 'ABSPATH' ) || exit; |
| 6 |
|
| 7 |
class ConnectAffiliate extends OnboardingStep { |
| 8 |
|
| 9 |
private string $amazon_dashboard_url = 'https://advertising.amazon.com/sign-in'; |
| 10 |
|
| 11 |
public function get_title(): string { |
| 12 |
return __( 'Connect Amazon partnership account', 'hostinger' ); |
| 13 |
} |
| 14 |
|
| 15 |
public function get_body(): array { |
| 16 |
return array( |
| 17 |
array( |
| 18 |
'title' => __( 'Login to the Amazon Product Advertising dashboard', 'hostinger' ), |
| 19 |
/* translators: %s: link to dashboard */ |
| 20 |
'description' => sprintf( __( 'To gather the necessary information, log in to your <a href="%s" target="_blank" rel="noopener">Amazon Product Advertising dashboard</a> using your personal Amazon partnership account.', 'hostinger' ), $this->amazon_dashboard_url ), |
| 21 |
), |
| 22 |
array( |
| 23 |
'title' => __( 'Open the Amazon Affiliate plugin configuration', 'hostinger' ), |
| 24 |
/* translators: %s: link to plugin page */ |
| 25 |
'description' => sprintf( __( 'Fill in the required details on the <a href="%s" class="hst-open-affiliate-tab">Amazon Affiliate plugin page</a>, where you\'ll find all the necessary information about the plugin.', 'hostinger' ), $this->get_redirect_link() ), |
| 26 |
), |
| 27 |
array( |
| 28 |
'title' => __( 'Copy-Paste the necessary information:', 'hostinger' ), |
| 29 |
/* translators: %s: link to dashboard */ |
| 30 |
'description' => sprintf( __( 'Complete the form with required information related to Amazon\'s partnership API. Retrieve all this information from the <a href="%s" target="_blank" rel="noopener">Amazon Product Advertising dashboard</a> and paste it into the form.', 'hostinger' ), $this->amazon_dashboard_url ), |
| 31 |
), |
| 32 |
); |
| 33 |
} |
| 34 |
|
| 35 |
public function step_identifier(): string { |
| 36 |
return 'connect_affiliate_settings'; |
| 37 |
} |
| 38 |
|
| 39 |
public function get_redirect_link(): string { |
| 40 |
return admin_url( 'admin.php?page=hostinger' ); |
| 41 |
} |
| 42 |
|
| 43 |
public function button_text(): string { |
| 44 |
return __( 'Connect Amazon Account', 'hostinger' ); |
| 45 |
} |
| 46 |
} |
| 47 |
|