| 1 |
<?php |
| 2 |
|
| 3 |
namespace Hostinger\Admin\Onboarding\Steps; |
| 4 |
|
| 5 |
defined( 'ABSPATH' ) || exit; |
| 6 |
|
| 7 |
class SetupStore extends OnboardingStep { |
| 8 |
public function get_title(): string { |
| 9 |
return esc_html__( 'Set up your online store', 'hostinger' ); |
| 10 |
} |
| 11 |
|
| 12 |
public function get_body(): array { |
| 13 |
ob_start(); |
| 14 |
|
| 15 |
?> |
| 16 |
|
| 17 |
<?php echo esc_html__( 'Complete this following steps to set up your online store. Don\'t worry, WooCommerce will help you to finish the steps.', 'hostinger' ); ?> |
| 18 |
<ul> |
| 19 |
<li> |
| 20 |
<?php echo esc_html__( 'Add products', 'hostinger' ); ?> |
| 21 |
</li> |
| 22 |
<li> |
| 23 |
<?php echo esc_html__( 'Set up payments', 'hostinger' ); ?> |
| 24 |
</li> |
| 25 |
<li> |
| 26 |
<?php echo esc_html__( 'Stock management (if needed)', 'hostinger' ); ?> |
| 27 |
</li> |
| 28 |
<li> |
| 29 |
<?php echo esc_html__( 'Add tax rates (if needed)', 'hostinger' ); ?> |
| 30 |
</li> |
| 31 |
<li> |
| 32 |
<?php echo esc_html__( 'Advertising configuration (if needed)', 'hostinger' ); ?> |
| 33 |
</li> |
| 34 |
</ul> |
| 35 |
<?php |
| 36 |
|
| 37 |
$description = ob_get_contents(); |
| 38 |
|
| 39 |
ob_end_clean(); |
| 40 |
|
| 41 |
return array( |
| 42 |
array( |
| 43 |
'description' => $description, |
| 44 |
), |
| 45 |
); |
| 46 |
} |
| 47 |
|
| 48 |
public function step_identifier(): string { |
| 49 |
return 'setup_store'; |
| 50 |
} |
| 51 |
|
| 52 |
public function get_redirect_link(): string { |
| 53 |
return esc_url( admin_url( 'admin.php?page=wc-admin&path=' . rawurlencode( '/setup-wizard' ) ) ); |
| 54 |
} |
| 55 |
|
| 56 |
public function button_text(): string { |
| 57 |
return esc_html__( 'Set up store', 'hostinger' ); |
| 58 |
} |
| 59 |
} |
| 60 |
|